Use "pageAdd*" events from the Events class

This commit is contained in:
Dmitriy Simushev 2014-10-20 08:36:26 +00:00
parent e847944228
commit ae85a1914e

View File

@ -24,6 +24,7 @@
namespace Mibew\Mibew\Plugin\Emoji;
use Mibew\EventDispatcher\EventDispatcher;
use Mibew\EventDispatcher\Events;
use Symfony\Component\HttpFoundation\Request;
/**
@ -72,9 +73,9 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi
{
// Attach CSS and JS files of the plugin to chat window.
$dispatcher = EventDispatcher::getInstance();
$dispatcher->attachListener('pageAddCSS', $this, 'attachCssFiles');
$dispatcher->attachListener('pageAddJS', $this, 'attachJsFiles');
$dispatcher->attachListener('pageAddJSPluginOptions', $this, 'attachPluginOptions');
$dispatcher->attachListener(Events::PAGE_ADD_CSS, $this, 'attachCssFiles');
$dispatcher->attachListener(Events::PAGE_ADD_JS, $this, 'attachJsFiles');
$dispatcher->attachListener(Events::PAGE_ADD_JS_PLUGIN_OPTIONS, $this, 'attachPluginOptions');
}
/**