Hi

I had some trouble to get the action helper working.

In Bootstrap.php I have a _initFront method.

I put the file Request.php under library/App/Controler/Action/Helper and add
the line:
Zend_Controller_Action_HelperBroker::addHelper(new
App_Controller_Action_Helper_Request());
to the initFront method but the action helper could not be found. I tried
addPrefix, addPath and nothing.

I get it working adding this to initFront():

$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('App');

before
Zend_Controller_Action_HelperBroker::addHelper(
            new App_Controller_Action_Helper_Request()
);

Is this the way to register action helpers with the broker ?

Cheers
holo





2009/6/24 holografix . <[email protected]>

> Hi
>
> Great! Thank you very much for the suggestion.
>
> Cheers,
> holo
>
> 2009/6/24 Matthew Weier O'Phinney <[email protected]>
>
> -- holografix . <[email protected]> wrote
>> (on Wednesday, 24 June 2009, 03:02 PM +0100):
>> > I'm looking at the docs but can t find anything.
>> > I would like to know if it's possible to get the
>> module/controller/action that
>> > called some action.
>> >
>> > Say, when action 'list' inside 'user' controller is fired, can we know
>> from
>> > where it was called ?
>>
>> We don't have any tracking of that internally at this time. You could
>> easily build up an action helper that tracks that info, however --
>> simply do a preDispatch() hook on it that records the current
>> module/controller/action set, and have a method that allows you to pop
>> the last set for comparison purposes.
>>
>> --
>> Matthew Weier O'Phinney
>> Project Lead            | [email protected]
>> Zend Framework          | http://framework.zend.com/
>>
>
>

Reply via email to