Scaffolding is a set of automatic actions for starting web development work faster.
Scaffold inspects your database tables, and making educated guesses, sets up a number of pages for each of your Models. These pages have data forms that work, and afford the web developer an early look at the data, and the possibility to over-ride scaffolded actions with custom-made ones.
$_passedVars
protected array
$_validSession
protected boolean
$controller
public $layout
public string
$model
public string
$name
public string
$request
public $scaffoldTitle
public string
$viewPath
public string
When methods are now present in a controller scaffoldView is used to call default Scaffold methods if: public $scaffold;
is placed in the controller's class definition.
Sends a message to the user. Either uses Sessions or flash messages depending on the availability of a session
__construct( Controller $controller , CakeRequest $request )
Construct and set up given controller with given parameters.
Controller
$controller
CakeRequest
$request
MissingModelException
_associations( )
Returns associations for controllers models.
_scaffold( CakeRequest $request )
When methods are now present in a controller scaffoldView is used to call default Scaffold methods if: public $scaffold;
is placed in the controller's class definition.
CakeRequest
$request
MissingActionException
MissingDatabaseException
_scaffoldDelete( CakeRequest $request )
Performs a delete on given scaffolded Model.
CakeRequest
$request
MethodNotAllowedException
NotFoundException
_scaffoldError( )
Show a scaffold error
_scaffoldForm( string $action 'edit' )
Renders an add or edit action for scaffolded model.
$action
optional 'edit' _scaffoldIndex( array $params )
Renders index action of scaffolded model.
$params
_scaffoldSave( CakeRequest $request , string $action 'edit' )
Saves or updates the scaffolded model.
CakeRequest
$request
$action
optional 'edit' NotFoundException
_scaffoldView( CakeRequest $request )
Renders a view action of scaffolded model.
CakeRequest
$request
NotFoundException
_sendMessage( string $message , string $element 'default' )
Sends a message to the user. Either uses Sessions or flash messages depending on the availability of a session
$message
$element
optional 'default' protected array
List of variables to collect from the associated controller
array( 'layout', 'name', 'viewPath', 'request' )
© 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.
http://api.cakephp.org/2.8/class-Scaffold.html