LayoutBuilderEvents.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Drupal\layout_builder;
  3. /**
  4. * Defines events for the layout_builder module.
  5. *
  6. * @see \Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent
  7. *
  8. * @internal
  9. * Layout Builder is currently experimental and should only be leveraged by
  10. * experimental modules and development releases of contributed modules.
  11. * See https://www.drupal.org/core/experimental for more information.
  12. */
  13. final class LayoutBuilderEvents {
  14. /**
  15. * Name of the event fired when a component's render array is built.
  16. *
  17. * This event allows modules to collaborate on creating the render array of
  18. * the SectionComponent object. The event listener method receives a
  19. * \Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent
  20. * instance.
  21. *
  22. * @Event
  23. *
  24. * @see \Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent
  25. * @see \Drupal\layout_builder\SectionComponent::toRenderArray()
  26. *
  27. * @var string
  28. */
  29. const SECTION_COMPONENT_BUILD_RENDER_ARRAY = 'section_component.build.render_array';
  30. }