| Total Complexity | 7 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | readonly class TopLinksEventSubscriber implements EventSubscriberInterface |
||
| 15 | { |
||
| 16 | private TopLinksPlugin $plugin; |
||
| 17 | |||
| 18 | public function __construct( |
||
| 19 | private EntityManagerInterface $entityManager |
||
| 20 | ) { |
||
| 21 | $this->plugin = TopLinksPlugin::create(); |
||
| 22 | } |
||
| 23 | |||
| 24 | public static function getSubscribedEvents(): array |
||
| 25 | { |
||
| 26 | return [ |
||
| 27 | Events::COURSE_CREATED => 'onCreateCourse', |
||
| 28 | ]; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function onCreateCourse(CourseCreatedEvent $event): void |
||
| 44 | } |
||
| 45 | } |
||
| 46 | } |
||
| 48 |