Cakephp Override HtmlHelper::link

前端 未结 7 1539
离开以前
离开以前 2021-01-06 18:42

I want to setup HtmlHelper::link() method so the default options array have escape = false.

How can I achieve this without changing the core class?

OBS: I al

7条回答
  •  误落风尘
    2021-01-06 19:12

    In Cake 2.0

    Create your OwnHelper class containing a link method, which extends HtmlHelper, in AppController specify:

    $helpers = array('Html' => array('className' => 'OwnHelper'));
    

    via ADmad

提交回复
热议问题