function FieldStorageConfigStorage::mapFromStorageRecords
Same name in other branches
- 9 core/modules/field/src/FieldStorageConfigStorage.php \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords()
- 8.9.x core/modules/field/src/FieldStorageConfigStorage.php \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords()
- 10 core/modules/field/src/FieldStorageConfigStorage.php \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords()
Overrides EntityStorageBase::mapFromStorageRecords
File
-
core/
modules/ field/ src/ FieldStorageConfigStorage.php, line 160
Class
- FieldStorageConfigStorage
- Storage handler for "field storage" configuration entities.
Namespace
Drupal\fieldCode
protected function mapFromStorageRecords(array $records) {
foreach ($records as $id => &$record) {
try {
$class = $this->fieldTypeManager
->getPluginClass($record['type']);
} catch (PluginNotFoundException $e) {
$config_id = $this->getPrefix() . $id;
throw new PluginNotFoundException($record['type'], "Unable to determine class for field type '{$record['type']}' found in the '{$config_id}' configuration", $e->getCode(), $e);
}
$record['settings'] = $class::storageSettingsFromConfigData($record['settings']);
}
return parent::mapFromStorageRecords($records);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.