You are here

public static function BlockComponentPreviewFormReplace::getSubscribedEvents in Dashboards with Layout Builder 8

File

src/EventSubscriber/BlockComponentPreviewFormReplace.php, line 50

Class

BlockComponentPreviewFormReplace
Replaces form elements with divs in layout builder previews.

Namespace

Drupal\dashboards\EventSubscriber

Code

public static function getSubscribedEvents() {

  // Very low priority - we want this to occur last since we perform early
  // rendering of block components and want the most complete render array
  // before doing that.
  $events[LayoutBuilderEvents::SECTION_COMPONENT_BUILD_RENDER_ARRAY] = [
    'onBuildRender',
    -1000,
  ];
  return $events;
}