nirmal
nirmal

Reputation:

How can we access htmlhelper inside our custom helper?

accessing model in helper is correct or wrong? in cakephp application.

How can we access htmlhelper inside our custom helper?

Thanks

Upvotes: 2

Views: 774

Answers (1)

deceze
deceze

Reputation: 522081

Link to manual..

class LinkHelper extends AppHelper {
  var $helpers = array('Html');

  function makeEdit($title, $url) {
    $link = $this->Html->link($title, $url, array('class' => 'edit'));
  }
}

You can use any Model/Controller/Helper/etc anywhere, but really shouldn't. Another manual link.

Upvotes: 6

Related Questions