summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Stjerneman2017-01-08 14:33:04 +0100
committerEmil Stjerneman2017-01-08 14:33:04 +0100
commitabd037276aff63b1dbfafaa8708d07b1792c5960 (patch)
treefcbfb7f4f975f33f7d62fc1bdf41d2563202dde2
parent70623a975d65c11c835f61659a30e40e270b767c (diff)
Issue #2769191 by anon: Invalid condition operator when matching against Config Entities8.x-5.0-beta4
-rw-r--r--src/Plugin/Derivative/EntityMatcherDeriver.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Plugin/Derivative/EntityMatcherDeriver.php b/src/Plugin/Derivative/EntityMatcherDeriver.php
index 764d63c..a51e129 100644
--- a/src/Plugin/Derivative/EntityMatcherDeriver.php
+++ b/src/Plugin/Derivative/EntityMatcherDeriver.php
@@ -3,6 +3,7 @@
namespace Drupal\linkit\Plugin\Derivative;
use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -50,7 +51,7 @@ class EntityMatcherDeriver extends DeriverBase implements ContainerDeriverInterf
// Only entities that has a distinct canonical URI that is not the same
// as the edit-form URI will be derived.
- if ($canonical && ($canonical !== $edit_form)) {
+ if ($entity_type instanceof ContentEntityTypeInterface && $canonical && ($canonical !== $edit_form)) {
$this->derivatives[$entity_type_id] = $base_plugin_definition;
$this->derivatives[$entity_type_id]['id'] = $base_plugin_definition['id'] . ':' . $entity_type_id;
$this->derivatives[$entity_type_id]['label'] = $entity_type->getLabel();