src/EventListener/SonataAdmin/Block/VOD/CreateTitleActionListener.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\EventListener\SonataAdmin\Block\VOD;
  3. use Sonata\BlockBundle\Event\BlockEvent;
  4. /**
  5.  * Class CreateTitleActionListener.
  6.  */
  7. class CreateTitleActionListener extends AbstractVodTitle
  8. {
  9.     /**
  10.      * Responsible for adding block that would allow to create new titles.
  11.      *
  12.      * @param \Sonata\BlockBundle\Event\BlockEvent $event
  13.      *   The instance of the dispatched event
  14.      */
  15.     public function onListTableTopDispatched(BlockEvent $event): void
  16.     {
  17.         if (!$this->supports($event)) {
  18.             return;
  19.         }
  20.         $this->pushBlockType($event'app.block.vod.create_title_action');
  21.     }
  22. }