You are here

protected function LayoutBuilderDataHandlerTrait::getComponentConfiguration in Acquia Content Hub 8.2

Gets configuration for a Layout Builder component.

@todo Check pending patch to make SectionComponent::getConfiguration() public: https://www.drupal.org/project/drupal/issues/3046814

Parameters

\Drupal\layout_builder\SectionComponent $component: The Layout Builder component.

Return value

array The component configuration.

1 call to LayoutBuilderDataHandlerTrait::getComponentConfiguration()
LayoutBuilderDataHandlerTrait::unserializeComponents in src/LayoutBuilder/LayoutBuilderDataHandlerTrait.php
Prepares Layout Builder components to be unserialized.

File

src/LayoutBuilder/LayoutBuilderDataHandlerTrait.php, line 120

Class

LayoutBuilderDataHandlerTrait
Layout Builder trait for handling data.

Namespace

Drupal\acquia_contenthub\LayoutBuilder

Code

protected function getComponentConfiguration(SectionComponent $component) {
  $method = new \ReflectionMethod('\\Drupal\\layout_builder\\SectionComponent', 'getConfiguration');
  $method
    ->setAccessible(TRUE);
  return $method
    ->invoke($component);
}