function LayoutBuilderEntityViewDisplayStorage::mapToStorageRecord
Same name in other branches
- 8.9.x core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplayStorage.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayStorage::mapToStorageRecord()
- 10 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplayStorage.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayStorage::mapToStorageRecord()
- 11.x core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplayStorage.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayStorage::mapToStorageRecord()
Overrides ConfigEntityStorage::mapToStorageRecord
File
-
core/
modules/ layout_builder/ src/ Entity/ LayoutBuilderEntityViewDisplayStorage.php, line 20
Class
- LayoutBuilderEntityViewDisplayStorage
- Provides storage for entity view display entities that have layouts.
Namespace
Drupal\layout_builder\EntityCode
protected function mapToStorageRecord(EntityInterface $entity) {
$record = parent::mapToStorageRecord($entity);
if (!empty($record['third_party_settings']['layout_builder']['sections'])) {
$record['third_party_settings']['layout_builder']['sections'] = array_map(function (Section $section) {
return $section->toArray();
}, $record['third_party_settings']['layout_builder']['sections']);
}
return $record;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.