Skip to content
Snippets Groups Projects

Issue #3377594: Inline block check should also check for any blocks that have content dependencies

Merged Issue #3377594: Inline block check should also check for any blocks that have content dependencies
Merged Dave Reid requested to merge issue/helper-3377594:3377594-inline-block-check into 8.x-1.x
2 files
+ 22
5
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
3
@@ -135,19 +135,21 @@ class LayoutBuilder {
*
* @param \Drupal\layout_builder\SectionListInterface $sectionList
* The Layout builder section list.
* @param bool
* To return the plugins as objects instead of IDs.
*
* @return array
* A nested array of layout and block plugin IDs.
*/
public static function extractSectionListPlugins(SectionListInterface $sectionList): array {
public static function extractSectionListPlugins(SectionListInterface $sectionList, bool $plugin_instance = FALSE): array {
$plugins = [
'core.layout' => [],
'block' => [],
];
foreach ($sectionList->getSections() as $section) {
$plugins['core.layout'][] = $section->getLayoutId();
$plugins['core.layout'][] = $plugin_instance ? $section->getLayout() : $section->getLayoutId();
foreach ($section->getComponents() as $component) {
$plugins['block'][] = $component->getPluginId();
$plugins['block'][] = $plugin_instance ? $component->getPlugin() : $component->getPluginId();
}
}
return $plugins;
Loading