prepareLayout example

/** * Renders the Layout UI. * * @param \Drupal\layout_builder\SectionStorageInterface $section_storage * The section storage. * * @return array * A render array. */
  protected function layout(SectionStorageInterface $section_storage) {
    $this->prepareLayout($section_storage);

    $output = [];
    if ($this->isAjax()) {
      $output['status_messages'] = [
        '#type' => 'status_messages',
      ];
    }
    $count = 0;
    for ($i = 0; $i < $section_storage->count()$i++) {
      $output[] = $this->buildAddSectionLink($section_storage$count);
      $output[] = $this->buildAdministrativeSection($section_storage$count);
      
Home | Imprint | This part of the site doesn't use cookies.