ViewTask Class Reference

Inheritance diagram for ViewTask:

Shell Object List of all members.

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

Detailed Description

Definition at line 34 of file view.php.


Member Function Documentation

ViewTask::__associations ( model  ) 

Returns associations for controllers models.

Returns:
array $associations private

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'

Returns:
array Returns an variables to be made available to a view template private

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.

Parameters:
string $action Action to bake
string $content Content to write
Returns:
boolean Success public

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

Parameters:
string $template file to use
array $vars passed for use in templates
Returns:
string content from template public

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 (  ) 

Override initialize

public

Reimplemented from Shell.

Definition at line 89 of file view.php.


Member Data Documentation

ViewTask::$controllerName = null

Definition at line 62 of file view.php.

ViewTask::$controllerPath = null

Definition at line 69 of file view.php.

ViewTask::$path = VIEWS

Definition at line 55 of file view.php.

Referenced by bake(), and getContent().

ViewTask::$plugin = null

Definition at line 41 of file view.php.

ViewTask::$scaffoldActions = array('index', 'view', 'add', 'edit')

Definition at line 83 of file view.php.

ViewTask::$tasks = array('Project', 'Controller')

Reimplemented from Shell.

Definition at line 48 of file view.php.

ViewTask::$template = null

Definition at line 76 of file view.php.

Referenced by getContent().


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:57 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7