diff --git a/src/EventSubscriber/SectionComponentRender.php b/src/EventSubscriber/SectionComponentRender.php index 9a5f0e8..5f4d836 100644 --- a/src/EventSubscriber/SectionComponentRender.php +++ b/src/EventSubscriber/SectionComponentRender.php @@ -22,8 +22,10 @@ class SectionComponentRender implements EventSubscriberInterface { * {@inheritdoc} */ public static function getSubscribedEvents() { - $events[LayoutBuilderEvents::SECTION_COMPONENT_BUILD_RENDER_ARRAY] = ['onBuildRender']; - + $events = []; + if (class_exists('LayoutBuilderEvents')) { + $events[LayoutBuilderEvents::SECTION_COMPONENT_BUILD_RENDER_ARRAY] = ['onBuildRender']; + } return $events; }