Task class for creating and updating view files.
$controllerName
public string
$noTemplateActions
public array
An array of action names that don't require templates. These actions will not emit errors when doing bakeActions()
$path
public array
$scaffoldActions
public array
$tasks
public array
$template
public string
Loads Controller and sets variables for the template Available template variables 'modelClass', 'primaryKey', 'displayField', 'singularVar', 'pluralVar', 'singularHumanName', 'pluralHumanName', 'fields', 'foreignKeys', 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'
_associations( Model $model )
Returns associations for controllers models.
Model
$model
_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'
_methodsToBake( )
Get a list of actions that can / should have views baked for them.
bake( string $action , string $content '' )
Assembles and writes bakes the view file.
$action
$content
optional '' bakeActions( array $actions , array $vars )
Bake a view file for each of the supplied actions
$actions
$vars
execute( )
Execution method always used for tasks
BakeTask::execute()
getContent( string $action , array $vars null )
Builds content from template and variables
$action
$vars
optional null getOptionParser( )
Gets the option parser instance and configures it.
ConsoleOptionParser
getTemplate( string $action )
Gets the template name based on the action name
$action
getPath( )
Gets the path for output. Checks the plugin property and returns the correct path.
startup( )
Disable caching and enable debug for baking. This forces the most current database schema to be used.
public array
An array of action names that don't require templates. These actions will not emit errors when doing bakeActions()
array('delete')
public array
Actions to use for scaffolding
array('index', 'view', 'add', 'edit')
public array
Tasks to be loaded by this Task
array('Project', 'Controller', 'DbConfig', 'Template')
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-ViewTask.html