function LayoutPluginManager::getThemeImplementations
Same name in other branches
- 9 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getThemeImplementations()
- 8.9.x core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getThemeImplementations()
- 10 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getThemeImplementations()
File
-
core/
lib/ Drupal/ Core/ Layout/ LayoutPluginManager.php, line 162
Class
- LayoutPluginManager
- Provides a plugin manager for layouts.
Namespace
Drupal\Core\LayoutCode
public function getThemeImplementations() {
$hooks = [];
$hooks['layout'] = [
'render element' => 'content',
];
/** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */
$definitions = $this->getDefinitions();
foreach ($definitions as $definition) {
if ($template = $definition->getTemplate()) {
$hooks[$definition->getThemeHook()] = [
'render element' => 'content',
'base hook' => 'layout',
'template' => $template,
'path' => $definition->getTemplatePath(),
];
}
}
return $hooks;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.