You are here

public static function SectionComponentStyles::getSubscribedEvents in Block Style Plugins 8.2

File

src/EventSubscriber/SectionComponentStyles.php, line 35

Class

SectionComponentStyles
Adds Layout Builder component styles.

Namespace

Drupal\block_style_plugins\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events = [];

  // Skip this if the Layout Builder is not installed.
  if (class_exists('\\Drupal\\layout_builder\\LayoutBuilderEvents')) {
    $events[LayoutBuilderEvents::SECTION_COMPONENT_BUILD_RENDER_ARRAY] = 'onBuildRender';
  }
  return $events;
}