public static function PrepareLayout::getSubscribedEvents in Layout builder library 8
File
- src/EventSubscriber/PrepareLayout.php, line 40
Class
- PrepareLayout
- Alters a layout override to use layout library selection over the default.
Namespace
Drupal\layout_library\EventSubscriber
Code
public static function getSubscribedEvents() {
if (class_exists('Drupal\\layout_builder\\Event\\PrepareLayoutEvent')) {
$events[LayoutBuilderEvents::PREPARE_LAYOUT] = [
'onPrepareLayout',
20,
];
return $events;
}
return [];
}