function TestPrepareLayout::getSubscribedEvents

Same name in other branches
  1. 10 core/modules/layout_builder/tests/modules/layout_builder_element_test/src/EventSubscriber/TestPrepareLayout.php \Drupal\layout_builder_element_test\EventSubscriber\TestPrepareLayout::getSubscribedEvents()
  2. 11.x 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 54

Class

TestPrepareLayout
Provides an event subscriber for testing section storage alteration.

Namespace

Drupal\layout_builder_element_test\EventSubscriber

Code

public static function getSubscribedEvents() {
    // 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.