Acl\Shell\AclExtrasShell::getOptionParser PHP Method

getOptionParser() public method

Get the option parser for this shell.
public getOptionParser ( ) : Cake\Console\ConsoleOptionParser
return Cake\Console\ConsoleOptionParser
    public function getOptionParser()
    {
        $parser = parent::getOptionParser();
        $plugin = ['short' => 'p', 'help' => __('Plugin to process')];
        $parser->description(__("Better manage, and easily synchronize you application's ACO tree"))->addSubcommand('aco_update', ['parser' => ['options' => compact('plugin')], 'help' => __('Add new ACOs for new controllers and actions. Does not remove nodes from the ACO table.')])->addSubcommand('aco_sync', ['parser' => ['options' => compact('plugin')], 'help' => __('Perform a full sync on the ACO table.' . 'Will create new ACOs or missing controllers and actions.' . 'Will also remove orphaned entries that no longer have a matching controller/action')])->addSubcommand('recover', ['help' => __('Recover a corrupted Tree'), 'parser' => ['arguments' => ['type' => ['required' => true, 'help' => __('The type of tree to recover'), 'choices' => ['aco', 'aro']]]]]);
        return $parser;
    }