From ae85a1914e88115c41938ebbce13a518459b4197 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Mon, 20 Oct 2014 08:36:26 +0000 Subject: [PATCH] Use "pageAdd*" events from the Events class --- Plugin.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Plugin.php b/Plugin.php index 49ff24f..8356966 100644 --- a/Plugin.php +++ b/Plugin.php @@ -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'); } /**