for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* @package phpBB Extension - Paypal
* @copyright (c) 2015 tas2580 (https://tas2580.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
namespace tas2580\paypal\event;
* @ignore
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
* Event listener
class listener implements EventSubscriberInterface
{
static public function getSubscribedEvents()
static
return array(
'core.page_header' => 'page_header',
);
}
/** @var \phpbb\controller\helper */
protected $helper;
/** @var \phpbb\template\template */
protected $template;
/**@var \phpbb\user */
protected $user;
* Constructor
* @param \phpbb\controller\helper $helper Controller helper object
* @param \phpbb\template $template Template object
* @param \phpbb\user $user User object
public function __construct(\phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\user $user)
$this->helper = $helper;
$this->template = $template;
$this->user = $user;
public function page_header()
$this->user->add_lang_ext('tas2580/paypal', 'link');
$this->template->assign_vars(array(
'U_PAYPAL' => $this->helper->route('tas2580_paypal_controller', array()),
));