Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
config_entity_reference_selection
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
config_entity_reference_selection
Commits
15a3009e
Commit
15a3009e
authored
3 years ago
by
Luke Leber
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3255830
by Luke.Leber: Remove no-op assignment from deriver plugin
parent
45223038
No related branches found
No related tags found
1 merge request
!3
Issue #3255830: Remove no-op assignment from deriver plugin
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Plugin/Derivative/ConfigEntityReferenceSelection.php
+0
-2
0 additions, 2 deletions
src/Plugin/Derivative/ConfigEntityReferenceSelection.php
tests/src/Unit/DeriverTest.php
+2
-6
2 additions, 6 deletions
tests/src/Unit/DeriverTest.php
with
2 additions
and
8 deletions
src/Plugin/Derivative/ConfigEntityReferenceSelection.php
+
0
−
2
View file @
15a3009e
...
@@ -37,9 +37,7 @@ class ConfigEntityReferenceSelection extends DeriverBase implements ContainerDer
...
@@ -37,9 +37,7 @@ class ConfigEntityReferenceSelection extends DeriverBase implements ContainerDer
public
function
getDerivativeDefinitions
(
$base_plugin_definition
)
{
public
function
getDerivativeDefinitions
(
$base_plugin_definition
)
{
foreach
(
$this
->
entityTypeManager
->
getDefinitions
()
as
$entity_type_id
=>
$entity_type
)
{
foreach
(
$this
->
entityTypeManager
->
getDefinitions
()
as
$entity_type_id
=>
$entity_type
)
{
if
(
$entity_type
->
entityClassImplements
(
ConfigEntityInterface
::
class
))
{
if
(
$entity_type
->
entityClassImplements
(
ConfigEntityInterface
::
class
))
{
$entity_type_id
=
$entity_type
->
id
();
$label
=
$this
->
t
(
'Config: Filtered by specific @entity_type'
,
[
'@entity_type'
=>
$entity_type
->
getPluralLabel
()]);
$label
=
$this
->
t
(
'Config: Filtered by specific @entity_type'
,
[
'@entity_type'
=>
$entity_type
->
getPluralLabel
()]);
$this
->
derivatives
[
$entity_type_id
]
=
$base_plugin_definition
;
$this
->
derivatives
[
$entity_type_id
]
=
$base_plugin_definition
;
$this
->
derivatives
[
$entity_type_id
][
'entity_types'
]
=
[
$entity_type_id
];
$this
->
derivatives
[
$entity_type_id
][
'entity_types'
]
=
[
$entity_type_id
];
$this
->
derivatives
[
$entity_type_id
][
'base_plugin_label'
]
=
$label
;
$this
->
derivatives
[
$entity_type_id
][
'base_plugin_label'
]
=
$label
;
...
...
This diff is collapsed.
Click to expand it.
tests/src/Unit/DeriverTest.php
+
2
−
6
View file @
15a3009e
...
@@ -44,10 +44,6 @@ class DeriverTest extends UnitTestCase {
...
@@ -44,10 +44,6 @@ class DeriverTest extends UnitTestCase {
->
method
(
'entityClassImplements'
)
->
method
(
'entityClassImplements'
)
->
willReturn
(
TRUE
);
->
willReturn
(
TRUE
);
$config_entity_type
->
method
(
'id'
)
->
willReturn
(
'config_entity_type'
);
$config_entity_type
$config_entity_type
->
method
(
'getPluralLabel'
)
->
method
(
'getPluralLabel'
)
->
willReturn
(
'Config entity types'
);
->
willReturn
(
'Config entity types'
);
...
@@ -59,8 +55,8 @@ class DeriverTest extends UnitTestCase {
...
@@ -59,8 +55,8 @@ class DeriverTest extends UnitTestCase {
$entity_type_manager
$entity_type_manager
->
method
(
'getDefinitions'
)
->
method
(
'getDefinitions'
)
->
willReturn
([
->
willReturn
([
'
test_
content_entity'
=>
$content_entity_type
,
'content_entity
_type
'
=>
$content_entity_type
,
'
test_
config_entity'
=>
$config_entity_type
,
'config_entity
_type
'
=>
$config_entity_type
,
]);
]);
$container
=
new
ContainerBuilder
();
$container
=
new
ContainerBuilder
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment