예제 #1
0
/**
 * get the option parser.
 *
 * @return void
 */
	public function getOptionParser() {
		$parser = parent::getOptionParser();
		return $parser->description(
			__d('cake_console', 'Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.')
		)->addArgument('name', array(
			'help' => __d('cake_console', 'Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.')
		))->addOption('count', array(
			'help' => __d('cake_console', 'When using generated data, the number of records to include in the fixture(s).'),
			'short' => 'n',
			'default' => 10
		))->addOption('connection', array(
			'help' => __d('cake_console', 'Which database configuration to use for baking.'),
			'short' => 'c',
			'default' => 'default'
		))->addOption('plugin', array(
			'help' => __d('cake_console', 'CamelCased name of the plugin to bake fixtures for.'),
			'short' => 'p',
		))->addOption('records', array(
			'help' => __d('cake_console', 'Used with --count and <name>/all commands to pull [n] records from the live tables, where [n] is either --count or the default of 10'),
			'short' => 'r',
			'boolean' => true
		))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
	}
예제 #2
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__d('cake_console', 'Bake models.'))->addArgument('name', array('help' => __d('cake_console', 'Name of the model to bake. Can use Plugin.name to bake plugin models.')))->addSubcommand('all', array('help' => __d('cake_console', 'Bake all model files with associations and validation.')))->addOption('plugin', array('short' => 'p', 'help' => __d('cake_console', 'Plugin to bake the model into.')))->addOption('connection', array('short' => 'c', 'help' => __d('cake_console', 'The connection the model table is on.')))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
 }
예제 #3
0
 /**
  * get the option parser for this task
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__d('cake_console', 'Bake views for a controller, using built-in or custom templates.'))->addArgument('controller', array('help' => __d('cake_console', 'Name of the controller views to bake. Can be Plugin.name as a shortcut for plugin baking.')))->addArgument('action', array('help' => __d('cake_console', "Will bake a single action's file. core templates are (index, add, edit, view)")))->addArgument('alias', array('help' => __d('cake_console', 'Will bake the template in <action> but create the filename after <alias>.')))->addOption('plugin', array('short' => 'p', 'help' => __d('cake_console', 'Plugin to bake the view into.')))->addOption('admin', array('help' => __d('cake_console', 'Set to only bake views for a prefix in Routing.prefixes'), 'boolean' => true))->addOption('connection', array('short' => 'c', 'help' => __d('cake_console', 'The connection the connected model is on.')))->addSubcommand('all', array('help' => __d('cake_console', 'Bake all CRUD action views for all controllers. Requires models and controllers to exist.')))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
 }
예제 #4
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('cake_console', 'Bake a controller for a model. Using options you can bake public, admin or both.'))->addArgument('name', array('help' => __d('cake_console', 'Name of the controller to bake. Can use Plugin.name to bake controllers into plugins.')))->addOption('public', array('help' => __d('cake_console', 'Bake a controller with basic crud actions (index, view, add, edit, delete).'), 'boolean' => true))->addOption('admin', array('help' => __d('cake_console', 'Bake a controller with crud actions for one of the Routing.prefixes.'), 'boolean' => true))->addOption('plugin', array('short' => 'p', 'help' => __d('cake_console', 'Plugin to bake the controller into.')))->addOption('connection', array('short' => 'c', 'help' => __d('cake_console', 'The connection the controller\'s model is on.')))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'Theme to use when baking code.')))->addOption('force', array('short' => 'f', 'help' => __d('cake_console', 'Force overwriting existing files without prompting.')))->addSubcommand('all', array('help' => __d('cake_console', 'Bake all controllers with CRUD methods.')))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
     return $parser;
 }
예제 #5
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('cake_console', 'Bake test case skeletons for classes.'))->addArgument('type', array('help' => __d('cake_console', 'Type of class to bake, can be any of the following: controller, model, helper, component or behavior.'), 'choices' => array('Controller', 'controller', 'Model', 'model', 'Helper', 'helper', 'Component', 'component', 'Behavior', 'behavior')))->addArgument('name', array('help' => __d('cake_console', 'An existing class to bake tests for.')))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'Theme to use when baking code.')))->addOption('plugin', array('short' => 'p', 'help' => __d('cake_console', 'CamelCased name of the plugin to bake tests for.')))->addOption('force', array('short' => 'f', 'help' => __d('cake_console', 'Force overwriting existing files without prompting.')))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
     return $parser;
 }
예제 #6
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__('Bake test case skeletons for classes.'))->addArgument('type', array('help' => __('Type of class to bake, can be any of the following: controller, model, helper, component or behavior.'), 'choices' => array('controller', 'model', 'helper', 'component', 'behavior')))->addArgument('name', array('help' => __('An existing class to bake tests for.')))->addOption('plugin', array('short' => 'p', 'help' => __('CamelCased name of the plugin to bake tests for.')))->epilog(__('Omitting all arguments and options will enter into an interactive mode.'));
 }
예제 #7
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->addOption('plugin', array('short' => 'l', 'help' => __d('cake_console', 'Plugin.')))->addOption('appTestCase', array('short' => 'z', 'help' => __d('cake_console', 'App test case.')))->addOption('noAppTestCase', array('short' => 'n', 'help' => __d('cake_console', 'App test case.')))->addOption('slug', array('short' => 's', 'boolean' => true, 'help' => __d('cake_console', 'Use slug.')))->addOption('parentSlug', array('short' => 'f', 'boolean' => true, 'help' => __d('cake_console', 'Use slug.')))->addOption('user', array('short' => 'u', 'help' => __d('cake_console', 'Use user model.')))->addOption('parent', array('short' => 'r', 'help' => __d('cake_console', 'Use parent model.')))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'theme.')))->addOption('subthemes', array('short' => 'b', 'help' => __d('cake_console', 'subthemes.')))->addOption('property', array('short' => 'y', 'boolean' => true, 'help' => __d('cake_console', 'generate IDE properties hints for model relations')));
 }
예제 #8
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('cake_console', 'Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.'))->addArgument('name', array('help' => __d('cake_console', 'Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.')))->addOption('count', array('help' => __d('cake_console', 'When using generated data, the number of records to include in the fixture(s).'), 'short' => 'n', 'default' => 1))->addOption('connection', array('help' => __d('cake_console', 'Which database configuration to use for baking.'), 'short' => 'c', 'default' => 'default'))->addOption('plugin', array('help' => __d('cake_console', 'CamelCased name of the plugin to bake fixtures for.'), 'short' => 'p'))->addOption('schema', array('help' => __d('cake_console', 'Importing schema for fixtures rather than hardcoding it.'), 'short' => 's', 'boolean' => TRUE))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'Theme to use when baking code.')))->addOption('force', array('short' => 'f', 'help' => __d('cake_console', 'Force overwriting existing files without prompting.')))->addOption('records', array('help' => __d('cake_console', 'Used with --count and <name>/all commands to pull [n] records from the live tables, ' . 'where [n] is either --count or the default of 10.'), 'short' => 'r', 'boolean' => TRUE))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
     return $parser;
 }