You are here

protected function Layout::setSections in Layout builder library 8

Stores the information for all sections.

Implementations of this method are expected to call array_values() to rekey the list of sections.

Parameters

\Drupal\layout_builder\Section[] $sections: An array of section objects.

Return value

$this

Overrides SectionStorageTrait::setSections

File

src/Entity/Layout.php, line 137

Class

Layout
Defines a layout entity.

Namespace

Drupal\layout_library\Entity

Code

protected function setSections(array $sections) {
  $this->layout = array_values($sections);
  return $this;
}