[Module Dev] How To Access The Current Module


what is the recommended way to access the current module?

From the userGroups module (e.g. in components/UserGroupsIdentity.php), I can see examples like:


for accessing the profile property of the userGroups module.

Unfortunately this failed to me in some situations, so I ended up rewriting it as:


that has the disadvantage of explicitly knowing the module name.

I’m wondering how should I access the current module properly…

Thanks in advance, E.