Neos\Flow\Command\PackageCommandController::activateCommand PHP Method

activateCommand() public method

This command activates an existing, but currently inactive package.
public activateCommand ( string $packageKey ) : string
$packageKey string The package key of the package to create
return string
    public function activateCommand($packageKey)
    {
        if (!$this->packageManager->isPackageAvailable($packageKey)) {
            $this->outputLine('The package "%s" does not exist.', [$packageKey]);
            $this->quit(1);
        }
        if ($this->packageManager->isPackageActive($packageKey)) {
            $this->outputLine('Package "%s" is already active.', [$packageKey]);
            $this->quit(1);
        }
        $this->packageManager->activatePackage($packageKey);
        $this->outputLine('Activated package "%s".', [$packageKey]);
        Scripts::executeCommand('neos.flow:cache:flush', $this->settings, false);
        $this->sendAndExit(0);
    }