public EntityTypeManager::processDefinition(&$definition, $plugin_id)
Performs extra processing on plugin definitions.
By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.
Overrides DefaultPluginManager::processDefinition
File
- core/lib/Drupal/Core/Entity/EntityTypeManager.php, line 90
Class
- EntityTypeManager
- Manages entity type plugin definitions.
Namespace
Drupal\Core\Entity
Code
1 2 3 4 5 6 7 8 9 10 11 | public function processDefinition(& $definition , $plugin_id ) { /** @var \Drupal\Core\Entity\EntityTypeInterface $definition */ parent::processDefinition( $definition , $plugin_id ); // All link templates must have a leading slash. foreach (( array ) $definition ->getLinkTemplates() as $link_relation_name => $link_template ) { if ( $link_template [0] != '/' ) { throw new InvalidLinkTemplateException( "Link template '$link_relation_name' for entity type '$plugin_id' must start with a leading slash, the current link template is '$link_template'" ); } } } |
Please login to continue.