public function SectionData::setValue in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Plugin/DataType/SectionData.php \Drupal\layout_builder\Plugin\DataType\SectionData::setValue()
- 9 core/modules/layout_builder/src/Plugin/DataType/SectionData.php \Drupal\layout_builder\Plugin\DataType\SectionData::setValue()
File
- core/
modules/ layout_builder/ src/ Plugin/ DataType/ SectionData.php, line 32
Class
- SectionData
- Provides a data type wrapping \Drupal\layout_builder\Section.
Namespace
Drupal\layout_builder\Plugin\DataTypeCode
public function setValue($value, $notify = TRUE) {
if ($value && !$value instanceof Section) {
throw new \InvalidArgumentException(sprintf('Value assigned to "%s" is not a valid section', $this
->getName()));
}
parent::setValue($value, $notify);
}