Classes

Class SessionComponent

The CakePHP SessionComponent provides a way to persist client data between
page requests. It acts as a wrapper for the $_SESSION as well as providing
convenience methods for several $_SESSION related functions.

Used to set a session variable that can be used to output messages in the view.

In your controller: $this->Session->setFlash('This has been saved');

Additional params below can be passed to customize the output, or the Message.[key].
You can also set additional parameters when rendering flash messages. See SessionHelper::flash()
for more information on how to do that.

Returns

Calls a controller's method from any location. Can be used to connect controllers together
or tie plugins into a main application. requestAction can be used to return rendered views
or fetch the return value from controller actions.

Under the hood this method uses Router::reverse() to convert the $url parameter into a string
URL. You should use URL formats that are compatible with Router::reverse()

Passing POST and GET data

POST and GET data can be simulated in requestAction. Use $extra['url'] for
GET data. The $extra['data'] parameter allows POST data simulation.

Parameters

string|array
$url

String or array-based URL. Unlike other URL arrays in CakePHP, this
URL will not automatically handle passed and named arguments in the $url parameter.

array
$extraoptionalarray()

if array includes the key "return" it sets the AutoRender to true. Can
also be used to submit GET/POST data, and named/passed arguments.

Returns

mixed

Boolean true or false on success/failure, or contents
of rendered action if 'return' is set in $extra.