Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save erikfrerejean/2884343 to your computer and use it in GitHub Desktop.
Save erikfrerejean/2884343 to your computer and use it in GitHub Desktop.
<?php
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class phpbb_ext_test_event_test_assign_block_vars_listener implements EventSubscriberInterface
{
static public function getSubscribedEvents()
{
return array(
'core.assign_block_vars' => 'cabv',
);
}
public function cabv($event)
{
$event['vararray']['POSTER_WARNINGS'] = true;
}
}
<?php
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class phpbb_ext_test_event_test_viewtopic_postrow_listener implements EventSubscriberInterface
{
static public function getSubscribedEvents()
{
return array(
'core.viewtopic_postrow' => 'cvp',
);
}
public function cvp($event)
{
$event['postrow']['POSTER_WARNINGS'] = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment