public function listCommand(bool $loadingOrder = false)
    {
        $availablePackages = [];
        $frozenPackages = [];
        $longestPackageKey = 0;
        $freezeSupported = $this->bootstrap->getContext()->isDevelopment();

        foreach ($this->packageManager->getAvailablePackages() as $packageKey => $package) {
            if (strlen($packageKey) > $longestPackageKey) {
                $longestPackageKey = strlen($packageKey);
            }

            $availablePackages[$packageKey] = $package;

            if ($this->packageManager->isPackageFrozen($packageKey)) {
                $frozenPackages[$packageKey] = $package;
            }
        }

        if ($loadingOrder === false) {
            ksort($availablePackages);
        }

        $this->outputLine('PACKAGES:');
        /** @var PackageInterface|PackageKeyAwareInterface $package */
        foreach ($availablePackages as $package) {
            $frozenState = ($freezeSupported && isset($frozenPackages[$package->getPackageKey()]) ? '* ' : '  ');
            $this->outputLine(' ' . str_pad($package->getPackageKey(), $longestPackageKey + 3) . $frozenState . str_pad($package->getInstalledVersion(), 15));
        }

        if (count($frozenPackages) > 0 && $freezeSupported) {
            $this->outputLine();
            $this->outputLine(' * frozen package');
        }
    }
public function listCommand(bool $loadingOrder = false)
    {
        $availablePackages = [];
        $frozenPackages = [];
        $longestPackageKey = 0;
        $freezeSupported = $this->bootstrap->getContext()->isDevelopment();

        foreach ($this->packageManager->getAvailablePackages() as $packageKey => $package) {
            if (strlen($packageKey) > $longestPackageKey) {
                $longestPackageKey = strlen($packageKey);
            }

            $availablePackages[$packageKey] = $package;

            if ($this->packageManager->isPackageFrozen($packageKey)) {
                $frozenPackages[$packageKey] = $package;
            }
        }

        if ($loadingOrder === false) {
            ksort($availablePackages);
        }

        $this->outputLine('PACKAGES:');
        /** @var PackageInterface|PackageKeyAwareInterface $package */
        foreach ($availablePackages as $package) {
            $frozenState = ($freezeSupported && isset($frozenPackages[$package->getPackageKey()]) ? '* ' : '  ');
            $this->outputLine(' ' . str_pad($package->getPackageKey(), $longestPackageKey + 3) . $frozenState . str_pad($package->getInstalledVersion(), 15));
        }

        if (count($frozenPackages) > 0 && $freezeSupported) {
            $this->outputLine();
            $this->outputLine(' * frozen package');
        }
    }
public function listCommand ( bool $ loadingOrder = false ) { $ availablePackages = [ ] ; $ frozenPackages = [ ] ; $ longestPackageKey = 0 ; $ freezeSupported = $ this -> bootstrap -> getContext ( ) -> isDevelopment ( ) ; foreach ( $ this -> packageManager -> getAvailablePackages ( ) as $ packageKey => $ package ) { if ( strlen ( $ packageKey ) > $ longestPackageKey ) { $ longestPackageKey = strlen ( $ packageKey ) ; } $ availablePackages [ $ packageKey ] = $ package ; if ( $ this -> packageManager -> isPackageFrozen ( $ packageKey ) ) { $ frozenPackages [ $ packageKey ] = $ package ; } } if ( $ loadingOrder === false ) { ksort ( $ availablePackages ) ; } $ this -> outputLine ( 'PACKAGES:' ) ; /** @var PackageInterface|PackageKeyAwareInterface $package */ foreach ( $ availablePackages as $ package ) { $ frozenState = ( $ freezeSupported && isset ( $ frozenPackages [ $ package -> getPackageKey ( ) ] ) ? '* ' : '  ' ) ; $ this -> outputLine ( ' ' . str_pad ( $ package -> getPackageKey ( ) , $ longestPackageKey + 3 ) . $ frozenState . str_pad ( $ package -> getInstalledVersion ( ) , 15 ) ) ; } if ( count ( $ frozenPackages ) > 0 && $ freezeSupported ) { $ this -> outputLine ( ) ; $ this -> outputLine ( ' * frozen package' ) ; } }
List available packages

Lists all locally available packages. Displays the package key, version and
package title.

@param boolean $loadingOrder The returned packages are ordered by their loading order.
@return void The list of packages
@see neos.flow:package:activate
@see neos.flow:package:deactivate
List available packages