# \#laminas-eventmanager

**URL:** https://discourse.laminas.dev/tag/laminas-eventmanager/46.md

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [Use different layout for each module](https://discourse.laminas.dev/t/use-different-layout-for-each-module/3300)

<div class="topic-metadata">

**Author:** [@Super0Yt](https://discourse.laminas.dev/u/Super0Yt)\
**Replies:** 10\
**Last updated:** [April 21, 2023, 3:54pm UTC](https://discourse.laminas.dev/t/use-different-layout-for-each-module/3300 "2023-04-21T15:54:18Z")

</div>

Is it possible to set up a layout for each module? I am following an Oleg Krivtsov’s tutorial, but I don’t understand how to create a layout for each module. I’m struggling with the use of partial, helper, and listener …

---

## [Where to register EventListeners to work via MVC and CLI](https://discourse.laminas.dev/t/where-to-register-eventlisteners-to-work-via-mvc-and-cli/3233)

<div class="topic-metadata">

**Author:** [@FalkHe](https://discourse.laminas.dev/u/FalkHe)\
**Replies:** 3\
**Last updated:** [March 9, 2023, 11:04am UTC](https://discourse.laminas.dev/t/where-to-register-eventlisteners-to-work-via-mvc-and-cli/3233 "2023-03-09T11:04:03Z")

</div>

Looks like EventListeners are totally ignored when code is executed via laminas-cli. The Reason is that neither Module::onBoostrap() nor the config key ‘listeners’ is handled by lamainas-cli. But what’s the alternative…

---

## [How to listen to events triggered by Laminas Event Manager?](https://discourse.laminas.dev/t/how-to-listen-to-events-triggered-by-laminas-event-manager/3181)

<div class="topic-metadata">

**Author:** [@ALTAMASH80](https://discourse.laminas.dev/u/ALTAMASH80)\
**Replies:** 6\
**Last updated:** [February 1, 2023, 3:45pm UTC](https://discourse.laminas.dev/t/how-to-listen-to-events-triggered-by-laminas-event-manager/3181 "2023-02-01T15:45:18Z")

</div>

Hi, I’m unable to listen to events triggered by Laminas’s Event Manager. The event triggered by this code in this section is not being listened to by the aggregate listener shown in this post. Thanks!

---

## [ViewEvent Listener](https://discourse.laminas.dev/t/viewevent-listener/3098)

<div class="topic-metadata">

**Author:** [@makxk](https://discourse.laminas.dev/u/makxk)\
**Replies:** 3\
**Last updated:** [November 10, 2022, 12:07pm UTC](https://discourse.laminas.dev/t/viewevent-listener/3098 "2022-11-10T12:07:48Z")

</div>

Hi everyone! I have been trying to register a Listener for ViewEvent::EVENT\_RENDERER\_POST, and I have hit a wall. This is what I have: PostRendererListener: \<?php namespace Application\\Listener; use Laminas\\EventM…

---

## [Routing in a listener class not going as I want it to be](https://discourse.laminas.dev/t/routing-in-a-listener-class-not-going-as-i-want-it-to-be/2997)

<div class="topic-metadata">

**Author:** [@goharsahi](https://discourse.laminas.dev/u/goharsahi)\
**Replies:** 4\
**Last updated:** [August 11, 2022, 11:24am UTC](https://discourse.laminas.dev/t/routing-in-a-listener-class-not-going-as-i-want-it-to-be/2997 "2022-08-11T11:24:13Z")

</div>

I’ve this listener class class LoginListener implements ListenerAggregateInterface { /\*\* @var array \*/ protected $listeners; /\*\* @var LoginService $loginService \*/ protected LoginService $loginService; …

---

## [Check access to controller method](https://discourse.laminas.dev/t/check-access-to-controller-method/2570)

<div class="topic-metadata">

**Author:** [@Kriss\_Kals](https://discourse.laminas.dev/u/Kriss_Kals)\
**Replies:** 9\
**Last updated:** [November 8, 2021, 7:41am UTC](https://discourse.laminas.dev/t/check-access-to-controller-method/2570 "2021-11-08T07:41:07Z")

</div>

Hello, I have several controllers with different actions. Let’s assume that in a few cases I would like for the whole controller to check if the user, based on the passed parameter (let’s assume category\_id), can perfor…

---

## [I have got problems on laminas event management](https://discourse.laminas.dev/t/i-have-got-problems-on-laminas-event-management/2523)

<div class="topic-metadata">

**Author:** [@jobsfan](https://discourse.laminas.dev/u/jobsfan)\
**Replies:** 9\
**Last updated:** [September 28, 2021, 9:18am UTC](https://discourse.laminas.dev/t/i-have-got-problems-on-laminas-event-management/2523 "2021-09-28T09:18:31Z")

</div>

From my last topic Which is the best entrance for a prizing discourse? When reply to a topic, will win a prize by chance, to attract more people to take part in I learned I may need to use event-way to solve my problem. …

---

## [Blog post: Laminas Event Manager and Lazy listeners](https://discourse.laminas.dev/t/blog-post-laminas-event-manager-and-lazy-listeners/2029)

<div class="topic-metadata">

**Author:** [@tomstryja](https://discourse.laminas.dev/u/tomstryja)\
**Replies:** 4\
**Last updated:** [January 5, 2021, 1:32pm UTC](https://discourse.laminas.dev/t/blog-post-laminas-event-manager-and-lazy-listeners/2029 "2021-01-05T13:32:54Z")

</div>

Post about Laminas Event Manager with some examples of implementations. Any feedback is appreciated. Laminas Event Manager and Lazy listeners

---

## [LazyListenerAggregate](https://discourse.laminas.dev/t/lazylisteneraggregate/1811)

<div class="topic-metadata">

**Author:** [@tomstryja](https://discourse.laminas.dev/u/tomstryja)\
**Replies:** 2\
**Last updated:** [September 7, 2020, 10:30am UTC](https://discourse.laminas.dev/t/lazylisteneraggregate/1811 "2020-09-07T10:30:17Z")

</div>

I would like to implement listener, which is not required on every request (that is the purpose of LazyListener). But I can’t figure out working example. Here is the code: \<?php namespace Order; use Laminas\\Config; use…

---

## [ZF3/Laminas Shared Event Manager Debugging](https://discourse.laminas.dev/t/zf3-laminas-shared-event-manager-debugging/1430)

<div class="topic-metadata">

**Author:** [@tnrn9b](https://discourse.laminas.dev/u/tnrn9b)\
**Replies:** 1\
**Last updated:** [March 12, 2020, 8:20pm UTC](https://discourse.laminas.dev/t/zf3-laminas-shared-event-manager-debugging/1430 "2020-03-12T20:20:12Z")

</div>

Debugging the shared event manager can be difficult after ZF2 removed some of the class methods. Here’s a function to retrieve information from an instance of the shared event manager: protected function getTargetsFromS…
