Code: Select all
if ($this->phpbb_container->has('core.the_event_for_31.blah'))
{
// your magic
}
Code: Select all
global $phpbb_container;
if ($phpbb_container->has('core.text_formatter_s9e_render_after'))
{
var_dump ("True. Version 3.2.");
// return array...
}
else
{
var_dump ("False. Version 3.1.");
// return array...
}
dispatcher
service to check if there is a listener registered for a specific event, but there's no generic way to tell if it ever gets triggered, until it does.core.common
. By the time it is triggered, the config
service is set up and ready for use.PHPBB_VERSION
instead of $config['version']
.