public function SectionComponent::toArray in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::toArray()
- 9 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::toArray()
Returns an array representation of the section component.
Only use this method if you are implementing custom storage for sections.
Return value
array An array representation of the section component.
File
- core/
modules/ layout_builder/ src/ SectionComponent.php, line 290
Class
- SectionComponent
- Provides a value object for a section component.
Namespace
Drupal\layout_builderCode
public function toArray() {
return [
'uuid' => $this
->getUuid(),
'region' => $this
->getRegion(),
'configuration' => $this
->getConfiguration(),
'weight' => $this
->getWeight(),
'additional' => $this->additional,
];
}