/** * Builds an instance of this class. * * @param Zikula_EventManager $eventManager An instance of a Zikula event manager appropriate for this listener. */ public function __construct(Zikula_EventManager $eventManager) { parent::__construct($eventManager); $this->domain = ZLanguage::getModuleDomain($this->name); $this->serviceManager = $eventManager->getServiceManager(); $this->request = $this->serviceManager->getService('request'); }
/** * Constructs a new instance of this class. * * The name attribute is set to the module name; the view attribute is set to a current instance of * {@link Zikula_View}; the request attribute is set to the current request service instance, and the * domain attribute is initialized to the module name. The helper attribute is initialized with an instance * of {@link Legal_Helper_AcceptPolicies}. * * @param Zikula_EventManager $eventManager The current event manager instance. */ public function __construct(Zikula_EventManager $eventManager) { parent::__construct($eventManager); $this->name = Legal_Constant::MODNAME; $this->request = $this->serviceManager->getService('request'); $this->domain = ZLanguage::getModuleDomain($this->name); $this->helper = new Legal_Helper_AcceptPolicies(); }