diff --git a/src/ContextProvider/FileContextProvider.php b/src/ContextProvider/FileContextProvider.php index 014fd824..b7645e2c 100644 --- a/src/ContextProvider/FileContextProvider.php +++ b/src/ContextProvider/FileContextProvider.php @@ -43,7 +43,7 @@ class FileContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getAvailableContexts() { - $context = EntityContext::fromEntityTypeId('entity:file', $this->t('File from entity hook')); + $context = EntityContext::fromEntityTypeId('file', $this->t('File from entity hook')); return ['@islandora.file_route_context_provider:file' => $context]; } diff --git a/src/ContextProvider/FileRouteContextProvider.php b/src/ContextProvider/FileRouteContextProvider.php index dc00dafe..21323e8d 100644 --- a/src/ContextProvider/FileRouteContextProvider.php +++ b/src/ContextProvider/FileRouteContextProvider.php @@ -38,7 +38,7 @@ class FileRouteContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getRuntimeContexts(array $unqualified_context_ids) { - $context_definition = EntityContextDefinition::fromEntityTypeId('entity:file')->setLabel(NULL)->setRequired(FALSE); + $context_definition = EntityContextDefinition::fromEntityTypeId('file')->setLabel(NULL)->setRequired(FALSE); $value = NULL; @@ -66,7 +66,7 @@ class FileRouteContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getAvailableContexts() { - $context = EntityContext::fromEntityTypeId('entity:file', $this->t('File from URL')); + $context = EntityContext::fromEntityTypeId('file', $this->t('File from URL')); return ['file' => $context]; } diff --git a/src/ContextProvider/MediaContextProvider.php b/src/ContextProvider/MediaContextProvider.php index 01dbd2ea..038b6ad8 100644 --- a/src/ContextProvider/MediaContextProvider.php +++ b/src/ContextProvider/MediaContextProvider.php @@ -43,7 +43,7 @@ class MediaContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getAvailableContexts() { - $context = EntityContext::fromEntityTypeId('entity:media', $this->t('Media from entity hook')); + $context = EntityContext::fromEntityType(\Drupal::entityTypeManager()->getDefinition('media'), $this->t('Media from URL')); return ['@islandora.media_route_context_provider:media' => $context]; } diff --git a/src/ContextProvider/MediaRouteContextProvider.php b/src/ContextProvider/MediaRouteContextProvider.php index cab44a6c..c40699f1 100644 --- a/src/ContextProvider/MediaRouteContextProvider.php +++ b/src/ContextProvider/MediaRouteContextProvider.php @@ -40,7 +40,7 @@ class MediaRouteContextProvider implements ContextProviderInterface { */ public function getRuntimeContexts(array $unqualified_context_ids) { $result = []; - $context_definition = EntityContextDefinition::fromEntityTypeId('entity:media')->setLabel(NULL)->setRequired(FALSE); + $context_definition = EntityContextDefinition::fromEntityTypeId('media')->setLabel(NULL)->setRequired(FALSE); $value = NULL; // Hack the media out of the route. @@ -71,7 +71,7 @@ class MediaRouteContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getAvailableContexts() { - $context = EntityContext::fromEntityTypeId('entity:media', $this->t('Media from URL')); + $context = EntityContext::fromEntityType(\Drupal::entityTypeManager()->getDefinition('media'), $this->t('Media from URL')); return ['media' => $context]; } diff --git a/src/ContextProvider/NodeContextProvider.php b/src/ContextProvider/NodeContextProvider.php index 04122078..f044af4b 100644 --- a/src/ContextProvider/NodeContextProvider.php +++ b/src/ContextProvider/NodeContextProvider.php @@ -43,7 +43,7 @@ class NodeContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getAvailableContexts() { - $context = EntityContext::fromEntityTypeId('entity:node', $this->t('Node from entity hook')); + $context = EntityContext::fromEntityTypeId('node', $this->t('Node from entity hook')); return ['@node.node_route_context:node' => $context]; } diff --git a/src/ContextProvider/TermContextProvider.php b/src/ContextProvider/TermContextProvider.php index 0b51a0d2..a7b0274a 100644 --- a/src/ContextProvider/TermContextProvider.php +++ b/src/ContextProvider/TermContextProvider.php @@ -43,7 +43,7 @@ class TermContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getAvailableContexts() { - $context = EntityContext::fromEntityTypeId('entity:taxonomy_term', $this->t('Term from entity hook')); + $context = EntityContext::fromEntityTypeId('taxonomy_term', $this->t('Term from entity hook')); return ['@islandora.taxonomy_term_route_context_provider:taxonomy_term' => $context]; } diff --git a/src/ContextProvider/TermRouteContextProvider.php b/src/ContextProvider/TermRouteContextProvider.php index dc3a7ec9..b54cc226 100644 --- a/src/ContextProvider/TermRouteContextProvider.php +++ b/src/ContextProvider/TermRouteContextProvider.php @@ -38,7 +38,7 @@ class TermRouteContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getRuntimeContexts(array $unqualified_context_ids) { - $context_definition = EntityContextDefinition::fromEntityTypeId('entity:taxonomy_term')->setLabel(NULL)->setRequired(FALSE); + $context_definition = EntityContextDefinition::fromEntityTypeId('taxonomy_term')->setLabel(NULL)->setRequired(FALSE); $value = NULL; // Hack the taxonomy term out of the route. @@ -65,7 +65,7 @@ class TermRouteContextProvider implements ContextProviderInterface { * {@inheritdoc} */ public function getAvailableContexts() { - $context = EntityContext::fromEntityTypeId('entity:taxonomy_term', $this->t('Term from URL')); + $context = EntityContext::fromEntityTypeId('taxonomy_term', $this->t('Term from URL')); return ['taxonomy_term' => $context]; }