function TestSectionList::__construct
Same name in other branches
- 9 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\TestSectionList::__construct()
- 8.9.x core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\TestSectionList::__construct()
- 10 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\TestSectionList::__construct()
TestSectionList constructor.
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTraitTest.php, line 52
Class
Namespace
Drupal\Tests\layout_builder\KernelCode
public function __construct(array $sections) {
// Loop through each section and reconstruct it to ensure that all default
// values are present.
foreach ($sections as $section) {
$this->sections[] = Section::fromArray($section->toArray());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.