/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser = $parser->description('Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.')->addArgument('name', ['help' => 'Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.'])->addOption('table', ['help' => 'The table name if it does not follow conventions.'])->addOption('count', ['help' => 'When using generated data, the number of records to include in the fixture(s).', 'short' => 'n', 'default' => 1])->addOption('schema', ['help' => 'Create a fixture that imports schema, instead of dumping a schema snapshot into the fixture.', 'short' => 's', 'boolean' => true])->addOption('records', ['help' => 'Generate a fixture with records from the non-test database.' . ' Used with --count and --conditions to limit which records are added to the fixture.', 'short' => 'r', 'boolean' => true])->addOption('conditions', ['help' => 'The SQL snippet to use when importing records.', 'default' => '1=1'])->addSubcommand('all', ['help' => 'Bake all fixture files for tables in the chosen connection.']); return $parser; }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description('Bake table and entity classes.')->addArgument('name', ['help' => 'Name of the model to bake. Can use Plugin.name to bake plugin models.'])->addSubcommand('all', ['help' => 'Bake all model files with associations and validation.'])->addOption('table', ['help' => 'The table name to use if you have non-conventional table names.'])->addOption('no-entity', ['boolean' => true, 'help' => 'Disable generating an entity class.'])->addOption('no-table', ['boolean' => true, 'help' => 'Disable generating a table class.'])->addOption('no-validation', ['boolean' => true, 'help' => 'Disable generating validation rules.'])->addOption('no-rules', ['boolean' => true, 'help' => 'Disable generating a rules checker.'])->addOption('no-associations', ['boolean' => true, 'help' => 'Disable generating associations.'])->addOption('no-fields', ['boolean' => true, 'help' => 'Disable generating accessible fields in the entity.'])->addOption('fields', ['help' => 'A comma separated list of fields to make accessible.'])->addOption('no-hidden', ['boolean' => true, 'help' => 'Disable generating hidden fields in the entity.'])->addOption('hidden', ['help' => 'A comma separated list of fields to hide.'])->addOption('primary-key', ['help' => 'The primary key if you would like to manually set one.' . ' Can be a comma separated list if you are using a composite primary key.'])->addOption('display-field', ['help' => 'The displayField if you would like to choose one.'])->addOption('no-test', ['boolean' => true, 'help' => 'Do not generate a test case skeleton.'])->addOption('no-fixture', ['boolean' => true, 'help' => 'Do not generate a test fixture skeleton.'])->epilog('Omitting all arguments and options will list the table names you can generate models for'); return $parser; }
/** * get the option parser. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description('Generate a new CakePHP project skeleton.')->addArgument('name', ['help' => 'Application directory to make, if it starts with "/" the path is absolute.'])->addOption('empty', ['boolean' => true, 'help' => 'Create empty files in each of the directories. Good if you are using git'])->addOption('template', ['short' => 't', 'help' => 'Template to use when baking code.'])->addOption('composer', ['default' => ROOT . DS . 'composer.phar', 'help' => 'The path to the composer executable.'])->removeOption('plugin'); }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description('Create the directory structure, AppController class and testing setup for a new plugin. ' . 'Can create plugins in any of your bootstrapped plugin paths.')->addArgument('name', ['help' => 'CamelCased name of the plugin to create.'])->addOption('composer', ['default' => ROOT . DS . 'composer.phar', 'help' => 'The path to the composer executable.'])->removeOption('plugin'); return $parser; }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description('Bake test case skeletons for classes.')->addArgument('type', ['help' => 'Type of class to bake, can be any of the following:' . ' controller, model, helper, component or behavior.', 'choices' => ['Controller', 'controller', 'Table', 'table', 'Entity', 'entity', 'Helper', 'helper', 'Component', 'component', 'Behavior', 'behavior', 'Shell', 'shell', 'Cell', 'cell', 'Form', 'form']])->addArgument('name', ['help' => 'An existing class to bake tests for.'])->addOption('fixtures', ['help' => 'A comma separated list of fixture names you want to include.'])->addOption('all', ['boolean' => true, 'help' => 'Bake all classes of the given type']); return $parser; }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description('Bake views for a controller, using built-in or custom templates. ')->addArgument('controller', ['help' => 'Name of the controller views to bake. Can be Plugin.name as a shortcut for plugin baking.'])->addArgument('action', ['help' => "Will bake a single action's file. core templates are (index, add, edit, view)"])->addArgument('alias', ['help' => 'Will bake the template in <action> but create the filename after <alias>.'])->addOption('controller', ['help' => 'The controller name if you have a controller that does not follow conventions.'])->addOption('prefix', ['help' => 'The routing prefix to generate views for.'])->addSubcommand('all', ['help' => '[optional] Bake all CRUD action views for all controllers. Requires models and controllers to exist.']); return $parser; }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description('Bake a controller skeleton.')->addArgument('name', ['help' => 'Name of the controller to bake. Can use Plugin.name to bake controllers into plugins.'])->addOption('components', ['help' => 'The comma separated list of components to use.'])->addOption('helpers', ['help' => 'The comma separated list of helpers to use.'])->addOption('prefix', ['help' => 'The namespace/routing prefix to use.'])->addOption('actions', ['help' => 'The comma separated list of actions to generate. ' . 'You can include custom methods provided by your template set here.'])->addOption('no-test', ['boolean' => true, 'help' => 'Do not generate a test skeleton.'])->addOption('no-actions', ['boolean' => true, 'help' => 'Do not generate basic CRUD action methods.'])->addSubcommand('all', ['help' => 'Bake all controllers with CRUD methods.']); return $parser; }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $name = $this->name(); $parser->description(sprintf('Bake a %s class file.', $name))->addArgument('name', ['help' => sprintf('Name of the %s to bake. Can use Plugin.name to bake %s files into plugins.', $name, $name)])->addOption('no-test', ['boolean' => true, 'help' => 'Do not generate a test skeleton.']); return $parser; }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description('Bake a JS Controller for use in FrontendBridge ')->addArgument('controller', ['help' => 'Controller Name, e.g. Posts', 'required' => true])->addArgument('action', ['help' => 'Action Name, e.g. addPost', 'required' => true]); return $parser; }
/** * Get the option parser for this task. * * This base class method sets up some commonly used options. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description(__d('cake_console', 'Task to dump/restore available settings.'))->addSubcommand('import', ['help' => __d('cake_console', 'Import settings from previously dumped files.')]); //->addSubcommand('export', [ // 'help' => __d('cake_console', 'Exporting available settings to dumps.') //]); return $parser; }
/** * Gets the option parser instance and configures it. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = parent::getOptionParser(); $parser->description('Bake migration class.')->addArgument('name', ['help' => 'Name of the migration to bake. Can use Plugin.name to bake plugin migrations.', 'required' => true])->addOption('connection', ['short' => 'c', 'default' => 'default', 'help' => 'The datasource connection to get data from.'])->addOption('checkModel', ['default' => true, 'help' => 'If model is set to true, check also that the model exists.'])->addOption('theme', ['short' => 't', 'default' => 'Migrations', 'help' => 'The theme to use when baking code.'])->addOption('plugin', ['short' => 'p', 'help' => 'Plugin to bake into.'])->epilog('Omitting all arguments and options will list the options for and arguments for the plugin'); return $parser; }