entityTypeManager = $entity_type_manager; } /**    * {@inheritdoc}    */ public static function create(ContainerInterface $container, $base_plugin_id) { return new static( $base_plugin_id, $container->get('entity_type.manager') ); } /**    * {@inheritdoc}    */ public function getDerivativeDefinitions($base_plugin_definition) { $links = []; $eventTypes = $this->entityTypeManager->getStorage('oc_event_type')->loadMultiple(); foreach ($eventTypes as $id => $eventType) { $links[$id] = [ 'title' => "Add ". $eventType->label() . " Event", 'route_name' => "entity.oc_event.add_form", 'route_parameters' => ['oc_event_type' => $eventType->id()] ] + $base_plugin_definition; } return $links; } }