public function listCommand($active = false, $inactive = false, $raw = false)
    {
        $extensionInformation = [];
        if (!$active || $inactive) {
            $this->emitPackagesMayHaveChangedSignal();
            $packages = $this->packageManager->getAvailablePackages();
        } else {
            $packages = $this->packageManager->getActivePackages();
        }
        foreach ($packages as $package) {
            if ($inactive && $this->packageManager->isPackageActive($package->getPackageKey())) {
                continue;
            }
            $metaData = $package->getPackageMetaData();
            $extensionInformation[] = [
                'package_key' => $package->getPackageKey(),
                'version' => $metaData->getVersion(),
                'description' => $metaData->getDescription(),
            ];
        }
        if ($raw) {
            $this->outputLine('%s', [implode(PHP_EOL, array_column($extensionInformation, 'package_key'))]);
        } else {
            $this->output->outputTable(
                $extensionInformation,
                ['Extension key', 'Version', 'Description']
            );
        }
    }
public function listCommand($active = false, $inactive = false, $raw = false)
    {
        $extensionInformation = [];
        if (!$active || $inactive) {
            $this->emitPackagesMayHaveChangedSignal();
            $packages = $this->packageManager->getAvailablePackages();
        } else {
            $packages = $this->packageManager->getActivePackages();
        }
        foreach ($packages as $package) {
            if ($inactive && $this->packageManager->isPackageActive($package->getPackageKey())) {
                continue;
            }
            $metaData = $package->getPackageMetaData();
            $extensionInformation[] = [
                'package_key' => $package->getPackageKey(),
                'version' => $metaData->getVersion(),
                'description' => $metaData->getDescription(),
            ];
        }
        if ($raw) {
            $this->outputLine('%s', [implode(PHP_EOL, array_column($extensionInformation, 'package_key'))]);
        } else {
            $this->output->outputTable(
                $extensionInformation,
                ['Extension key', 'Version', 'Description']
            );
        }
    }
public function listCommand ( $ active = false , $ inactive = false , $ raw = false ) { $ extensionInformation = [ ] ; if ( ! $ active || $ inactive ) { $ this -> emitPackagesMayHaveChangedSignal ( ) ; $ packages = $ this -> packageManager -> getAvailablePackages ( ) ; } else { $ packages = $ this -> packageManager -> getActivePackages ( ) ; } foreach ( $ packages as $ package ) { if ( $ inactive && $ this -> packageManager -> isPackageActive ( $ package -> getPackageKey ( ) ) ) { continue ; } $ metaData = $ package -> getPackageMetaData ( ) ; $ extensionInformation [ ] = [ 'package_key' => $ package -> getPackageKey ( ) , 'version' => $ metaData -> getVersion ( ) , 'description' => $ metaData -> getDescription ( ) , ] ; } if ( $ raw ) { $ this -> outputLine ( '%s' , [ implode ( PHP_EOL , array_column ( $ extensionInformation , 'package_key' ) ) ] ) ; } else { $ this -> output -> outputTable ( $ extensionInformation , [ 'Extension key' , 'Version' , 'Description' ] ) ; } }
List extensions that are available in the system

@param bool $active Only show active extensions
@param bool $inactive Only show inactive extensions
@param bool $raw Enable machine readable output (just extension keys separated by line feed)
List extensions that are available in the system