public static function TestPrepareLayout::getSubscribedEvents in Drupal 10
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php \Drupal\layout_builder_element_test\EventSubscriber\TestPrepareLayout::getSubscribedEvents()
File
- core/
modules/ layout_builder/ tests/ modules/ layout_builder_element_test/ src/ EventSubscriber/ TestPrepareLayout.php, line 55
Class
- TestPrepareLayout
- An event subscriber to test altering section storage via the \Drupal\layout_builder\Event\PrepareLayoutEvent.
Namespace
Drupal\layout_builder_element_test\EventSubscriberCode
public static function getSubscribedEvents() : array {
// Act before core's layout builder subscriber.
$events[LayoutBuilderEvents::PREPARE_LAYOUT][] = [
'onBeforePrepareLayout',
20,
];
// Act after core's layout builder subscriber.
$events[LayoutBuilderEvents::PREPARE_LAYOUT][] = [
'onAfterPrepareLayout',
-10,
];
return $events;
}