Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SectionComponent.php

function 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_builder

Code

public function toArray() {
    return [
        'uuid' => $this->getUuid(),
        'region' => $this->getRegion(),
        'configuration' => $this->getConfiguration(),
        'weight' => $this->getWeight(),
        'additional' => $this->additional,
    ];
}
RSS feed
Powered by Drupal