Cakephp Classroom image

pankaj
 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16|Last
Lessons:-Controllers

choose to define your own $helpers array in AppController, make sure to include Html and Form
if you want them still available by default in your Controllers. To learn more about these classes, be
sure to check out their respective sections later in this manual.
Let’s look at how to tell a CakePHP controller that you plan to use additional MVC classes:
class RecipesController extends AppController {
public $uses = array(’Recipe’, ’User’);
public $helpers = array(’Js’);
public $components = array(’RequestHandler’);
}
Each of these variables are merged with their inherited values, therefore it is not necessary (for example)
to redeclare the Form helper, or anything that is declared in your App controller.
property Controller::$components
The components array allows you to set which Components a controller will use. Like $helpers
and $uses components in your controllers are merged with those in AppController. As with
$helpers you can pass settings into components. See Configuring Components for more information.
Other Attributes
While you can check out the details for all controller attributes in the API, there are other controller attributes
that merit their own sections in the manual.

 
 
 

pankaj

Skills    Cakephp

Qualifications :-
Location :-,,,
Description:-
Explore
 

  Students (0)