Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ui_patterns
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
ui_patterns
Commits
a0ccce9f
Commit
a0ccce9f
authored
7 years ago
by
Chris Eastwood
Browse files
Options
Downloads
Patches
Plain Diff
Include element defaults in PatternLayout so pattern layouts render properly in panels
parent
dbea4ad0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/ui_patterns_layouts/src/Plugin/Layout/PatternLayout.php
+12
-2
12 additions, 2 deletions
...s/ui_patterns_layouts/src/Plugin/Layout/PatternLayout.php
with
12 additions
and
2 deletions
modules/ui_patterns_layouts/src/Plugin/Layout/PatternLayout.php
+
12
−
2
View file @
a0ccce9f
...
...
@@ -8,6 +8,7 @@ use Drupal\Core\Layout\LayoutDefinition;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\Core\Plugin\PluginFormInterface
;
use
Drupal\ui_patterns
\UiPatternsManager
;
use
Drupal\Core\Render\ElementInfoManagerInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
/**
...
...
@@ -24,6 +25,13 @@ class PatternLayout extends LayoutDefault implements PluginFormInterface, Contai
*/
protected
$patternManager
=
NULL
;
/**
* The element info.
*
* @var \Drupal\Core\Render\ElementInfoManagerInterface
*/
protected
$elementInfo
;
/**
* Constructs a LocalActionDefault object.
*
...
...
@@ -36,8 +44,9 @@ class PatternLayout extends LayoutDefault implements PluginFormInterface, Contai
* @param \Drupal\ui_patterns\UiPatternsManager $pattern_manager
* Pattern manager service.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
LayoutDefinition
$plugin_definition
,
UiPatternsManager
$pattern_manager
)
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
LayoutDefinition
$plugin_definition
,
ElementInfoManagerInterface
$element_info
,
UiPatternsManager
$pattern_manager
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$plugin_definition
);
$this
->
elementInfo
=
$element_info
;
$this
->
patternManager
=
$pattern_manager
;
}
...
...
@@ -49,6 +58,7 @@ class PatternLayout extends LayoutDefault implements PluginFormInterface, Contai
$configuration
,
$plugin_id
,
$plugin_definition
,
$container
->
get
(
'plugin.manager.element_info'
),
$container
->
get
(
'plugin.manager.ui_patterns'
)
);
}
...
...
@@ -74,7 +84,7 @@ class PatternLayout extends LayoutDefault implements PluginFormInterface, Contai
'#type'
=>
'pattern'
,
'#id'
=>
$this
->
getPluginDefinition
()
->
get
(
'additional'
)[
'pattern'
],
'#fields'
=>
$fields
,
];
]
+
$this
->
elementInfo
->
getInfo
(
'pattern'
)
;
}
/**
...
...
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