<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
*
* http://www.lockon.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Plugin\ReportPdf2;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ReportPdf2Event implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
'@admin/Order/index.twig' => 'onRenderAdminOrder',
'@admin/Order/edit.twig' => 'onRenderAdminOrderEdit',
'@admin/Order/shipping.twig' => 'onRenderAdminOrderShipping',
];
}
public function onRenderAdminOrder(TemplateEvent $event)
{
$event->addSnippet('@ReportPdf2/admin/add_btn.twig');
}
public function onRenderAdminOrderEdit(TemplateEvent $event)
{
$event->addSnippet('@ReportPdf2/admin/add_btn_edit.twig');
}
public function onRenderAdminOrderShipping(TemplateEvent $event)
{
$event->addSnippet('@ReportPdf2/admin/add_btn_shipping.twig');
}
}