Ever extended a core helper and been frustrated at hunting down every single call to the previous helper and replacing it with a call to your new object? The AnalogueHelper will remap a helper to a new name when in a view, allowing you to replace calls to the core helper with your own, new object.

Setting the mappings is done by adding an array to the $helpers declaration for the AnalogueHelper in your controller…

public $helpers = array(
    'Analogue' => array(
        array(
            'helper' => 'MyHtml',
            'rename' => 'Html'
        ),array(
            'helper' => 'MyForm',
            'rename' => 'Form'
        )
    )
);

This will take the helpers, MyHtmlHelper and MyFormHelper and remap them to the Html and Form variables when rendering begins.

Comment on this post