How to get the current controller name from a Model, Helper or other class [Deleted]

Rigel Kentaurus

Well-known member
Rigel Kentaurus submitted a new resource:

How to get the current controller name from a Model, Helper or other class (version 1.0.0) - Need the controller name somewhere other than the controller?

Sometimes you are extending a Model, and you want to do some operation only, and only if you are in a specific "phase". Sometimes you need to inject values to a response only for a specific flow.

If you ever need the current controller that was called, do this.

Step 1. Create a new listener. The listener must be in the front_controller_pre_dispatch

View attachment 26587


The code is actually simple. We will add the route to the global registry. Please note I have selected...

Read more about this resource...
 
Top Bottom