protected function TestSectionList::setSections in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\TestSectionList::setSections()
- 10 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\TestSectionList::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 SectionListTrait::setSections
File
- core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTraitTest.php, line 61
Class
Namespace
Drupal\Tests\layout_builder\KernelCode
protected function setSections(array $sections) {
$this->sections = array_values($sections);
return $sections;
}