Skip to content
Permalink
Browse files

Adding OptionParser to view task.

Adding epilog information about interactive mode to view and fixture tasks.
  • Loading branch information...
markstory committed Oct 13, 2010
1 parent d3e4ced commit 50139b153cc99d7bb076072b544ac4235cdccdd2
Showing with 29 additions and 2 deletions.
  1. +1 −1 cake/console/libs/tasks/fixture.php
  2. +1 −1 cake/console/libs/tasks/test.php
  3. +27 −0 cake/console/libs/tasks/view.php
@@ -85,7 +85,7 @@ public function getOptionParser() {
'help' => '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(__('Omitting all arguments and options will enter into an interactive mode.'));;
}
/**
@@ -426,6 +426,6 @@ public function getOptionParser() {
))->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.'));
}
}
@@ -460,6 +460,33 @@ public function help() {
$this->_stop();
}
/**
* get the option parser for this task
*
* @return ConsoleOptionParser
*/
public function getOptionParser() {
$parser = parent::getOptionParser();
return $parser->description(
__('Bake views for a controller, using built-in or custom templates.')
)->addArgument('controller', array(
'help' => __('Name of the controller views to bake. Can be Plugin.name as a shortcut for plugin baking.')
))->addArgument('action', array(
'help' => __("Will bake a single action's file. core templates are (index, add, edit, view)")
))->addArgument('alias', array(
'help' => __('Will bake the template in <action> but create the filename after <alias>.')
))->addOption('plugin', array(
'help' => __('Plugin to bake the view into.')
))->addOption('admin', array(
'help' => __('Set to only bake views for a prefix in Routing.prefixes'),
'boolean' => true
))->addOption('connection', array(
'help' => __('The connection the connected model is on.')
))->addSubcommand('all', array(
'help' => __('Bake all CRUD action views for all controllers. Requires models and controllers to exist.')
))->epilog(__('Omitting all arguments and options will enter into an interactive mode.'));
}
/**
* Returns associations for controllers models.
*

0 comments on commit 50139b1

Please sign in to comment.
You can’t perform that action at this time.