Reputation:
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
Reputation: 522081
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