Inheritance diagram for ViewTask:

Public Member Functions | |
| __associations ($model) | |
| __interactive () | |
| __loadController () | |
| bake ($action, $content= '') | |
| execute () | |
| getContent ($template=null, $vars=null) | |
| help () | |
| initialize () | |
Public Attributes | |
| $controllerName = null | |
| $controllerPath = null | |
| $path = VIEWS | |
| $plugin = null | |
| $scaffoldActions = array('index', 'view', 'add', 'edit') | |
| $tasks = array('Project', 'Controller') | |
| $template = null | |
Definition at line 34 of file view.php.
| ViewTask::__associations | ( | $ | model | ) |
Returns associations for controllers models.
Definition at line 372 of file view.php.
References pluralize(), and underscore().
Referenced by __loadController().
| ViewTask::__interactive | ( | ) |
Handles interactive baking
private
Definition at line 154 of file view.php.
References Shell::$interactive, __loadController(), Object::_stop(), bake(), Shell::getAdmin(), getContent(), Shell::hr(), Shell::in(), name(), Shell::out(), params(), and underscore().
Referenced by execute().
| ViewTask::__loadController | ( | ) |
Loads Controller and sets variables for the template Available template variables 'modelClass', 'primaryKey', 'displayField', 'singularVar', 'pluralVar', 'singularHumanName', 'pluralHumanName', 'fields', 'foreignKeys', 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'
Definition at line 234 of file view.php.
References __(), __associations(), Object::_stop(), Shell::err(), ClassRegistry::getObject(), humanize(), App::import(), singularize(), and variable().
Referenced by __interactive(), execute(), and getContent().
| ViewTask::bake | ( | $ | action, | |
| $ | content = '' | |||
| ) |
Assembles and writes bakes the view file.
| string | $action Action to bake | |
| string | $content Content to write |
Definition at line 288 of file view.php.
References $filename, $path, Shell::createFile(), Shell::err(), Folder(), getContent(), pwd(), and underscore().
Referenced by __interactive(), and execute().
| ViewTask::execute | ( | ) |
Execution method always used for tasks
public
Definition at line 96 of file view.php.
References Shell::$alias, __interactive(), __loadController(), bake(), camelize(), getContent(), Configure::read(), and underscore().
| ViewTask::getContent | ( | $ | template = null, |
|
| $ | vars = null | |||
| ) |
Builds content from template and variables
| string | $template file to use | |
| array | $vars passed for use in templates |
Definition at line 313 of file view.php.
References $path, $template, __(), __loadController(), Shell::err(), Shell::hr(), and Configure::read().
Referenced by __interactive(), bake(), and execute().
| ViewTask::help | ( | ) |
Displays help contents
public
Reimplemented from Shell.
Definition at line 355 of file view.php.
References Object::_stop(), Shell::hr(), and Shell::out().
| ViewTask::initialize | ( | ) |
| ViewTask::$path = VIEWS |
| ViewTask::$scaffoldActions = array('index', 'view', 'add', 'edit') |
| ViewTask::$tasks = array('Project', 'Controller') |
| ViewTask::$template = null |
1.4.7