Neos\Kickstarter\Command\KickstartCommandController::commandControllerCommand PHP Méthode

commandControllerCommand() public méthode

Creates a new command controller with the given name in the specified package. The generated controller class already contains an example command.
public commandControllerCommand ( string $packageKey, string $controllerName, boolean $force = false ) : string
$packageKey string The package key of the package for the new controller
$controllerName string The name for the new controller. This may also be a comma separated list of controller names.
$force boolean Overwrite any existing controller.
Résultat string
    public function commandControllerCommand($packageKey, $controllerName, $force = false)
    {
        $this->validatePackageKey($packageKey);
        if (!$this->packageManager->isPackageAvailable($packageKey)) {
            $this->outputLine('Package "%s" is not available.', array($packageKey));
            exit(2);
        }
        $generatedFiles = array();
        $controllerNames = Arrays::trimExplode(',', $controllerName);
        foreach ($controllerNames as $currentControllerName) {
            $generatedFiles += $this->generatorService->generateCommandController($packageKey, $currentControllerName, $force);
        }
        $this->outputLine(implode(PHP_EOL, $generatedFiles));
    }