Is there a way to pass every variable in a controller action, to the view automatically?
So instead of
class AppController extends Controller
{
public function initialize()
{
// Always enable the CSRF component.
$this->set('color', 'pink');
}
}
I can have
class AppController extends Controller
{
public function initialize()
{
// Always enable the CSRF component.
$color = "pink";
}
}
And putting $color in the view shows pink.