nikeshhajari wrote
> Hi,
>
> I was wondering if anyone could explain what is going on for this problem?
> I have an event that is changing the layout of my module and I have
> multiple modules. I noticed that if I change the event priority of the
> layout in one module sometimes the layout from the other module will
> appear instead. Is there anyone to make sure events/event priorities from
> module don't affect another? (namespace of events?)
It should work if you use Namespace as your target, for ie.:
class Module
{
public function init(ModuleManager $moduleManager)
{
$sharedManager =
$moduleManager->getEventManager()->getSharedManager();
$sharedManager->attach(__NAMESPACE__, Mvc::EVENT_DISPATCH,
function($e) {
$controller = $e->getTarget();
$controller->layout('layout/yourlayout');
}, 100);
}
-----
Cheers,
--
Luke Mierzwa
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Multi-Module-Conflicting-Event-Priorities-tp4657903p4657906.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]