
| Current Path : /var/www/html/pallets/web/core/modules/layout_builder/src/Event/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/pallets/web/core/modules/layout_builder/src/Event/PrepareLayoutEvent.php |
<?php
namespace Drupal\layout_builder\Event;
use Drupal\layout_builder\SectionStorageInterface;
use Drupal\Component\EventDispatcher\Event;
/**
* Event fired in #pre_render of \Drupal\layout_builder\Element\LayoutBuilder.
*
* Subscribers to this event can prepare section storage before rendering.
*
* @see \Drupal\layout_builder\LayoutBuilderEvents::PREPARE_LAYOUT
* @see \Drupal\layout_builder\Element\LayoutBuilder::prepareLayout()
*/
class PrepareLayoutEvent extends Event {
/**
* The section storage plugin.
*
* @var \Drupal\layout_builder\SectionStorageInterface
*/
protected $sectionStorage;
/**
* Constructs a new PrepareLayoutEvent.
*
* @param \Drupal\layout_builder\SectionStorageInterface $section_storage
* The section storage preparing the Layout.
*/
public function __construct(SectionStorageInterface $section_storage) {
$this->sectionStorage = $section_storage;
}
/**
* Gets the section storage.
*
* @return \Drupal\layout_builder\SectionStorageInterface
* The section storage.
*/
public function getSectionStorage(): SectionStorageInterface {
return $this->sectionStorage;
}
}