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