Scaffold Class Reference

Inheritance diagram for Scaffold:

Object List of all members.

Public Member Functions

 __associations ()
 __construct (&$controller, $params)
 __scaffold ($params)
 __scaffoldDelete ($params=array())
 __scaffoldError ()
 __scaffoldForm ($action= 'edit')
 __scaffoldIndex ($params)
 __scaffoldSave ($params=array(), $action= 'edit')
 __scaffoldView ($params)
 _output ()

Public Attributes

 $__passedVars = array('action', 'base', 'webroot', 'layout', 'name', 'viewPath', 'ext', 'params', 'data', 'plugin', 'cacheAction')
 $action = null
 $base = null
 $controller = null
 $ext = '.ctp'
 $layout = 'default'
 $model = null
 $name = null
 $params
 $plugin = null
 $scaffoldTitle = null
 $subDir = null
 $viewPath

Detailed Description

Definition at line 38 of file scaffold.php.


Constructor & Destructor Documentation

Scaffold::__construct ( &$  controller,
params 
)

Construct and set up given controller with given parameters.

Parameters:
string $controller_class Name of controller
array $params Parameters for scaffolding

Definition at line 136 of file scaffold.php.

References $controller.


Member Function Documentation

Scaffold::__associations (  ) 

Returns associations for controllers models.

Returns:
array Associations for model private

Definition at line 437 of file scaffold.php.

Scaffold::__scaffold ( params  ) 

When methods are now present in a controller scaffoldView is used to call default Scaffold methods if: var $scaffold; is placed in the controller's class definition.

Parameters:
array $params Parameters for scaffolding
Returns:
mixed A rendered view of scaffold action, or showing the error private

Definition at line 380 of file scaffold.php.

References create(), ConnectionManager::getDataSource(), and Configure::read().

Scaffold::__scaffoldDelete ( params = array()  ) 

Performs a delete on given scaffolded Model.

Parameters:
array $params Parameters for scaffolding
Returns:
mixed Success on delete, error if delete fails private

Definition at line 327 of file scaffold.php.

References $id, __(), error(), humanize(), and underscore().

Scaffold::__scaffoldError (  ) 

Show a scaffold error

Returns:
mixed A rendered view showing the error private

Definition at line 364 of file scaffold.php.

References error().

Scaffold::__scaffoldForm ( action = 'edit'  ) 

Renders an add or edit action for scaffolded model.

Parameters:
string $action Action (add or edit)
Returns:
mixed A rendered view with a form to edit or add a record in the Models database table private

Definition at line 239 of file scaffold.php.

Scaffold::__scaffoldIndex ( params  ) 

Renders index action of scaffolded model.

Parameters:
array $params Parameters for scaffolding
Returns:
mixed A rendered view listing rows from Models database table private

Definition at line 222 of file scaffold.php.

References variable().

Scaffold::__scaffoldSave ( params = array(),
action = 'edit' 
)

Saves or updates the scaffolded model.

Parameters:
array $params Parameters for scaffolding
string $action add or edt
Returns:
mixed Success on save/update, add/edit form if data is empty or error if save or update fails private

Definition at line 251 of file scaffold.php.

References __(), create(), humanize(), pluralize(), and variable().

Scaffold::__scaffoldView ( params  ) 

Renders a view action of scaffolded model.

Parameters:
array $params Parameters for scaffolding
Returns:
mixed A rendered view of a row from Models database table private

Definition at line 194 of file scaffold.php.

References __(), humanize(), underscore(), and variable().

Scaffold::_output (  ) 

Outputs the content of a scaffold method passing it through the Controller::afterFilter()

Returns:
void protected

Definition at line 183 of file scaffold.php.


Member Data Documentation

Scaffold::$__passedVars = array('action', 'base', 'webroot', 'layout', 'name', 'viewPath', 'ext', 'params', 'data', 'plugin', 'cacheAction')

Definition at line 122 of file scaffold.php.

Scaffold::$action = null

Definition at line 59 of file scaffold.php.

Scaffold::$base = null

Definition at line 80 of file scaffold.php.

Scaffold::$controller = null

Definition at line 45 of file scaffold.php.

Referenced by __construct().

Scaffold::$ext = '.ctp'

Definition at line 101 of file scaffold.php.

Scaffold::$layout = 'default'

Definition at line 87 of file scaffold.php.

Scaffold::$model = null

Definition at line 66 of file scaffold.php.

Scaffold::$name = null

Definition at line 52 of file scaffold.php.

Scaffold::$params

Definition at line 94 of file scaffold.php.

Scaffold::$plugin = null

Definition at line 115 of file scaffold.php.

Scaffold::$scaffoldTitle = null

Definition at line 129 of file scaffold.php.

Scaffold::$subDir = null

Definition at line 108 of file scaffold.php.

Scaffold::$viewPath

Definition at line 73 of file scaffold.php.


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