I need to change the behavior of $ form-> create, so I created an assistant to use instead of native formHelper:
SlugHelper:
App::import('Helper', 'Form'); class SlugFormHelper extends FormHelper { public function create() { return "error"; } }
In AppController:
public $helpers = array('SlugForm' => 'Form');
And in the view:
$form->create();
but it still calls native $form->create();
source share