/**
  * {@inheritdoc}
  */
 public function getDefinition($plugin_id, $exception_on_invalid = TRUE)
 {
     // If a fully qualified event name is passed, be sure to get the base name
     // first.
     $plugin_id = $this->getEventBaseName($plugin_id);
     return parent::getDefinition($plugin_id, $exception_on_invalid);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function getDefinition($entity_type_id, $exception_on_invalid = TRUE)
 {
     if (($entity_type = parent::getDefinition($entity_type_id, FALSE)) && class_exists($entity_type->getClass())) {
         return $entity_type;
     } elseif (!$exception_on_invalid) {
         return NULL;
     }
     throw new PluginNotFoundException($entity_type_id, sprintf('The "%s" entity type does not exist.', $entity_type_id));
 }