- Title: Member
- Status: Offline
- From: Rome
- Registered: 05-02-2008
- Posts: 39
Topic: Estendere un controller
Per estendere un controller è sufficente importare il controller da inserire prima della dichiarazione della nuova classe che ne è l'estensione.
Esempio:
App::import('Controller', 'Nodes');
class ArticlesController extends NodesController {
var $name = 'Articles';
Giusto da far notare che si deve importare "Nodes" e non "NodesController"
- Title: Administrator
- Status: Offline
- From: Pisa
- Registered: 04-02-2008
- Posts: 102
Re: Estendere un controller
Aggiungerei che è molto importante documentarsi sulla classe App della versione 1.2 in quanto ci sono funzioni avanzate 
Posts [ 2 ]
Guest posting is disabled. You must login or register to post a reply.
Topic info
0 guests and 0 users are reading this topic now
Currently used extensions: pun_topic_online_users, pun_karma, pun_admin_hook_navigator, pun_bbcode. Copyright © 2008 PunBB