Files
This commit is contained in:
dmzx
2015-03-12 14:12:59 +01:00
parent 930e9b4e83
commit 621aa7d9f9
60 changed files with 4656 additions and 17 deletions

59
event/listener.php Normal file
View File

@@ -0,0 +1,59 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\event;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class listener implements EventSubscriberInterface
{
protected $config;
protected $template;
protected $user;
protected $db;
protected $root_path;
protected $php_ext;
public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\template\template $template, \phpbb\user $user, \phpbb\db\driver\driver_interface $db, $root_path, $php_ext, $auth)
{
$this->config = $config;
$this->template = $template;
$this->user = $user;
$this->db = $db;
$this->root_path = $root_path;
$this->php_ext = $php_ext;
$this->auth = $auth;
}
static public function getSubscribedEvents()
{
return array(
'core.user_setup' => 'load_language_on_setup',
);
}
public function load_language_on_setup($event)
{
$lang_set_ext = $event['lang_set_ext'];
$lang_set_ext[] = array(
'ext_name' => 'dmzx/mchat',
'lang_set' => 'common',
);
$event['lang_set_ext'] = $lang_set_ext;
}
}