Posted By

sveggiani on 06/04/09


Tagged

cakephp not-mine


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

jpsirois
Vladislav


Use a helper inside a Controller in Cakephp


 / Published in: PHP
 

URL: http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/

  1. class UsersController extends AppController {
  2. function index() {
  3. App::import('Helper', 'Html'); // loadHelper('Html'); in CakePHP 1.1.x.x
  4. $html = new HtmlHelper();
  5. debug($html->link('Cake!', 'http://cakephp.org'));
  6. }
  7. }

Report this snippet  

You need to login to post a comment.