Inheritance diagram for ControllerTask:

Public Member Functions | |
| __interactive ($controllerName=false) | |
| bake ($controllerName, $actions= '', $helpers=null, $components=null, $uses=null) | |
| bakeActions ($controllerName, $admin=null, $wannaUseSession=true) | |
| bakeTest ($className) | |
| execute () | |
| getName () | |
| help () | |
| initialize () | |
| listAll ($useDbConfig= 'default') | |
Public Attributes | |
| $path = CONTROLLERS | |
| $plugin = null | |
| $tasks = array('Project') | |
Definition at line 33 of file controller.php.
| ControllerTask::__interactive | ( | $ | controllerName = false |
) |
Interactive
private
Definition at line 103 of file controller.php.
References Shell::$uses, __(), Shell::_checkUnitTest(), bake(), bakeActions(), bakeTest(), Shell::getAdmin(), getName(), Shell::hr(), Shell::in(), Shell::out(), and underscore().
Referenced by execute().
| ControllerTask::bake | ( | $ | controllerName, | |
| $ | actions = '', |
|||
| $ | helpers = null, |
|||
| $ | components = null, |
|||
| $ | uses = null | |||
| ) |
Assembles and writes a Controller file
| string | $controllerName Controller name | |
| string | $actions Actions to add, or set the whole controller to use $scaffold (set $actions to 'scaffold') | |
| array | $helpers Helpers to use in controller | |
| array | $components Components to use in controller | |
| array | $uses Models to use in controller |
Definition at line 406 of file controller.php.
References $filename, $out, Shell::$uses, Shell::_controllerPath(), Shell::_modelName(), camelize(), and Shell::createFile().
Referenced by __interactive(), and execute().
| ControllerTask::bakeActions | ( | $ | controllerName, | |
| $ | admin = null, |
|||
| $ | wannaUseSession = true | |||
| ) |
Bake scaffold actions
| string | $controllerName Controller name | |
| string | $admin Admin route to use | |
| boolean | $wannaUseSession Set to true to use sessions, false otherwise |
Definition at line 245 of file controller.php.
References __(), Shell::_controllerPath(), Shell::_modelName(), Shell::_pluralName(), Shell::_singularName(), a(), Shell::err(), humanize(), App::import(), and variable().
Referenced by __interactive(), and execute().
| ControllerTask::bakeTest | ( | $ | className | ) |
Assembles and writes a unit test file
| string | $className Controller class name |
Definition at line 461 of file controller.php.
References Shell::$className, $filename, $out, $path, Shell::createFile(), Shell::out(), and underscore().
Referenced by __interactive(), and execute().
| ControllerTask::execute | ( | ) |
Execution method always used for tasks
public
Definition at line 67 of file controller.php.
References __interactive(), Shell::_checkUnitTest(), bake(), bakeActions(), bakeTest(), camelize(), Shell::getAdmin(), Shell::out(), and Configure::read().
| ControllerTask::getName | ( | ) |
Forces the user to specify the controller he wants to bake, and returns the selected controller name.
Definition at line 533 of file controller.php.
References __(), Object::_stop(), camelize(), Shell::in(), listAll(), and Shell::out().
Referenced by __interactive().
| ControllerTask::help | ( | ) |
Displays help contents
public
Reimplemented from Shell.
Definition at line 566 of file controller.php.
References Object::_stop(), Shell::hr(), and Shell::out().
| ControllerTask::initialize | ( | ) |
| ControllerTask::listAll | ( | $ | useDbConfig = 'default' |
) |
Outputs and gets the list of possible models or controllers from database
| string | $useDbConfig Database configuration name |
Definition at line 497 of file controller.php.
References __(), Shell::_controllerName(), Shell::_modelName(), Object::_stop(), config(), Shell::err(), ConnectionManager::getDataSource(), and Shell::out().
Referenced by getName().
| ControllerTask::$path = CONTROLLERS |
| ControllerTask::$plugin = null |
Definition at line 40 of file controller.php.
| ControllerTask::$tasks = array('Project') |
1.4.7