Enable the user to provide a CLI theme through the --theme option for all bake tasks

This commit is contained in:
Christian Winther 2013-05-29 13:41:57 +00:00
parent cce9e84907
commit 2fca41c35d
7 changed files with 14 additions and 0 deletions

View file

@ -243,6 +243,8 @@ class BakeShell extends AppShell {
'help' => __d('cake_console', 'Database connection to use in conjunction with `bake all`.'), 'help' => __d('cake_console', 'Database connection to use in conjunction with `bake all`.'),
'short' => 'c', 'short' => 'c',
'default' => 'default' 'default' => 'default'
))->addOption('theme', array(
'help' => __d('cake_console', 'Theme to use when baking code.')
)); ));
} }

View file

@ -474,6 +474,8 @@ class ControllerTask extends BakeTask {
))->addOption('connection', array( ))->addOption('connection', array(
'short' => 'c', 'short' => 'c',
'help' => __d('cake_console', 'The connection the controller\'s model is on.') 'help' => __d('cake_console', 'The connection the controller\'s model is on.')
))->addOption('theme', array(
'help' => __d('cake_console', 'Theme to use when baking code`.')
))->addSubcommand('all', array( ))->addSubcommand('all', array(
'help' => __d('cake_console', 'Bake all controllers with CRUD methods.') '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.')); ))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));

View file

@ -87,6 +87,8 @@ class FixtureTask extends BakeTask {
'help' => __d('cake_console', 'Importing schema for fixtures rather than hardcoding it.'), 'help' => __d('cake_console', 'Importing schema for fixtures rather than hardcoding it.'),
'short' => 's', 'short' => 's',
'boolean' => true 'boolean' => true
))->addOption('theme', array(
'help' => __d('cake_console', 'Theme to use when baking code.')
))->addOption('records', array( ))->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.'), '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', 'short' => 'r',

View file

@ -992,6 +992,8 @@ class ModelTask extends BakeTask {
))->addOption('plugin', array( ))->addOption('plugin', array(
'short' => 'p', 'short' => 'p',
'help' => __d('cake_console', 'Plugin to bake the model into.') 'help' => __d('cake_console', 'Plugin to bake the model into.')
))->addOption('theme', array(
'help' => __d('cake_console', 'Theme to use when baking code.')
))->addOption('connection', array( ))->addOption('connection', array(
'short' => 'c', 'short' => 'c',
'help' => __d('cake_console', 'The connection the model table is on.') 'help' => __d('cake_console', 'The connection the model table is on.')

View file

@ -438,6 +438,8 @@ class ProjectTask extends AppShell {
))->addOption('empty', array( ))->addOption('empty', array(
'boolean' => true, 'boolean' => true,
'help' => __d('cake_console', 'Create empty files in each of the directories. Good if you are using git') 'help' => __d('cake_console', 'Create empty files in each of the directories. Good if you are using git')
))->addOption('theme', array(
'help' => __d('cake_console', 'Theme to use when baking code.')
))->addOption('skel', array( ))->addOption('skel', array(
'default' => current(App::core('Console')) . 'Templates' . DS . 'skel', 'default' => current(App::core('Console')) . 'Templates' . DS . 'skel',
'help' => __d('cake_console', 'The directory layout to use for the new application skeleton. Defaults to cake/Console/Templates/skel of CakePHP used to create the project.') 'help' => __d('cake_console', 'The directory layout to use for the new application skeleton. Defaults to cake/Console/Templates/skel of CakePHP used to create the project.')

View file

@ -563,6 +563,8 @@ class TestTask extends BakeTask {
) )
))->addArgument('name', array( ))->addArgument('name', array(
'help' => __d('cake_console', 'An existing class to bake tests for.') 'help' => __d('cake_console', 'An existing class to bake tests for.')
))->addOption('theme', array(
'help' => __d('cake_console', 'Theme to use when baking code.')
))->addOption('plugin', array( ))->addOption('plugin', array(
'short' => 'p', 'short' => 'p',
'help' => __d('cake_console', 'CamelCased name of the plugin to bake tests for.') 'help' => __d('cake_console', 'CamelCased name of the plugin to bake tests for.')

View file

@ -435,6 +435,8 @@ class ViewTask extends BakeTask {
))->addOption('admin', array( ))->addOption('admin', array(
'help' => __d('cake_console', 'Set to only bake views for a prefix in Routing.prefixes'), 'help' => __d('cake_console', 'Set to only bake views for a prefix in Routing.prefixes'),
'boolean' => true 'boolean' => true
))->addOption('theme', array(
'help' => __d('cake_console', 'Theme to use when baking code.')
))->addOption('connection', array( ))->addOption('connection', array(
'short' => 'c', 'short' => 'c',
'help' => __d('cake_console', 'The connection the connected model is on.') 'help' => __d('cake_console', 'The connection the connected model is on.')