Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Issue forks
linkit-2886455
Commits
abd03727
Commit
abd03727
authored
Jan 08, 2017
by
Emil Stjerneman
Browse files
Issue
#2769191
by anon: Invalid condition operator when matching against Config Entities
parent
70623a97
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Plugin/Derivative/EntityMatcherDeriver.php
View file @
abd03727
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment