protected function Dashboard::setSections in Dashboards with Layout Builder 8
Same name and namespace in other branches
- 2.0.x src/Entity/Dashboard.php \Drupal\dashboards\Entity\Dashboard::setSections()
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/ Dashboard.php, line 140
Class
- Dashboard
- Dashboard.
Namespace
Drupal\dashboards\EntityCode
protected function setSections(array $sections) {
$this->sections = array_values($sections);
return $this;
}