<?php
namespace App\EventListener\SonataAdmin\Block\VOD;
use Sonata\BlockBundle\Event\BlockEvent;
/**
* Class CreateTitleActionListener.
*/
class CreateTitleActionListener extends AbstractVodTitle
{
/**
* Responsible for adding block that would allow to create new titles.
*
* @param \Sonata\BlockBundle\Event\BlockEvent $event
* The instance of the dispatched event
*/
public function onListTableTopDispatched(BlockEvent $event): void
{
if (!$this->supports($event)) {
return;
}
$this->pushBlockType($event, 'app.block.vod.create_title_action');
}
}