class NavigationLayout
Same name in other branches
- 10 core/modules/navigation/src/NavigationLayout.php \Drupal\navigation\NavigationLayout
Defines a layout class for navigation.
@internal
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
- class \Drupal\Core\Layout\LayoutDefault extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Layout\LayoutInterface, \Drupal\Core\Plugin\PluginFormInterface, \Drupal\Core\Plugin\PreviewAwarePluginInterface uses \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait, \Drupal\Core\Plugin\ContextAwarePluginTrait
- class \Drupal\navigation\NavigationLayout extends \Drupal\Core\Layout\LayoutDefault
- class \Drupal\Core\Layout\LayoutDefault extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Layout\LayoutInterface, \Drupal\Core\Plugin\PluginFormInterface, \Drupal\Core\Plugin\PreviewAwarePluginInterface uses \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait, \Drupal\Core\Plugin\ContextAwarePluginTrait
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
Expanded class hierarchy of NavigationLayout
1 string reference to 'NavigationLayout'
- navigation.layouts.yml in core/
modules/ navigation/ navigation.layouts.yml - core/modules/navigation/navigation.layouts.yml
File
-
core/
modules/ navigation/ src/ NavigationLayout.php, line 15
Namespace
Drupal\navigationView source
final class NavigationLayout extends LayoutDefault {
/**
* {@inheritdoc}
*/
public function build(array $regions) {
foreach (Element::children($regions) as $region_id) {
foreach (Element::children($regions[$region_id]) as $component_uuid) {
if (!Element::isEmpty($regions[$region_id][$component_uuid])) {
$regions[$region_id][$component_uuid]['#theme'] = 'block__navigation';
}
}
}
return parent::build($regions);
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.