Template Task can generate templated output Used in other Tasks. Acts like a simplified View class.
$templatePaths
public array
Paths to look for templates on. Contains a list of $theme => $path
$templateVars
public array
Find a template inside a directory inside a path. Will scan all other theme dirs if the template is not found in the first directory.
Find the theme name for the current operation. If there is only one theme in $templatePaths it will be used. If there is a -theme param in the cli args, it will be used. If there is more than one installed theme user interaction will happen
_findTemplate( string $path , string $directory , string $filename )
Find a template inside a directory inside a path. Will scan all other theme dirs if the template is not found in the first directory.
$path
$directory
$filename
_findThemes( )
Find the paths to all the installed shell themes in the app.
Bake themes are directories not named skel
inside a Console/Templates
path. They are listed in this order: app -> plugin -> default
generate( string $directory , string $filename , array $vars null )
Runs the template
$directory
$filename
$vars
optional null getThemePath( )
Find the theme name for the current operation. If there is only one theme in $templatePaths it will be used. If there is a -theme param in the cli args, it will be used. If there is more than one installed theme user interaction will happen
set( string|array $one , string|array $two null )
Set variable values to the template scope
$one
$two
optional null Value in case $one is a string (which then works as the key). Unused if $one is an associative array, otherwise serves as the values to $one's keys.
public array
Paths to look for templates on. Contains a list of $theme => $path
array()
© 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-TemplateTask.html