src/Subscriber/Content/MediacenterSubscriber.php line 42

Open in your IDE?
  1. <?php
  2. namespace App\Subscriber\Content;
  3. use App\Event\Content\ContentWatchedEvent;
  4. use App\Service\Content\MemberContentService;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class MediacenterSubscriber implements EventSubscriberInterface
  7. {
  8.     protected MemberContentService $service;
  9.     /**
  10.      * MediacenterSubscriber constructor.
  11.      */
  12.     public function __construct(MemberContentService $service)
  13.     {
  14.         $this->setService($service);
  15.     }
  16.     public function setService(MemberContentService $service): self
  17.     {
  18.         $this->service $service;
  19.         return $this;
  20.     }
  21.     public function getService(): MemberContentService
  22.     {
  23.         return $this->service;
  24.     }
  25.     public static function getSubscribedEvents(): array
  26.     {
  27.         return [
  28.             ContentWatchedEvent::class => [
  29.                 ['onContentWatched'0],
  30.             ],
  31.         ];
  32.     }
  33.     public function onContentWatched(ContentWatchedEvent $event)
  34.     {
  35.     }
  36. }