You are here

public function SectionStorageDefinition::set in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/SectionStorage/SectionStorageDefinition.php \Drupal\layout_builder\SectionStorage\SectionStorageDefinition::set()
  2. 9 core/modules/layout_builder/src/SectionStorage/SectionStorageDefinition.php \Drupal\layout_builder\SectionStorage\SectionStorageDefinition::set()

Sets a value to an arbitrary property.

Parameters

string $property: The property to use for the value.

mixed $value: The value to set.

Return value

$this

1 call to SectionStorageDefinition::set()
SectionStorageDefinition::__construct in core/modules/layout_builder/src/SectionStorage/SectionStorageDefinition.php
LayoutDefinition constructor.

File

core/modules/layout_builder/src/SectionStorage/SectionStorageDefinition.php, line 81

Class

SectionStorageDefinition
Provides section storage type plugin definition.

Namespace

Drupal\layout_builder\SectionStorage

Code

public function set($property, $value) {
  if (property_exists($this, $property)) {
    $this->{$property} = $value;
  }
  else {
    $this->additional[$property] = $value;
  }
  return $this;
}