<?php
/**
* This file is part of BundleSale4
*
* Copyright(c) Akira Kurozumi <info@a-zumi.net>
*
* https://a-zumi.net
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Plugin\BundleSale4;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Eccube\Event\TemplateEvent;
class Event implements EventSubscriberInterface
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'@admin/Product/product.twig' => 'onRenderAdminProduct',
];
}
/**
* 管理画面:商品登録画面にセット商品登録フォームを表示する.
*
* @param TemplateEvent $event
*/
public function onRenderAdminProduct(TemplateEvent $event)
{
if(!$event->getParameter("has_class")) {
$event->addSnippet('@BundleSale4/admin/bundle_item.twig');
}
}
}