protected function FieldStorageConfigStorage::mapToStorageRecord in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/FieldStorageConfigStorage.php \Drupal\field\FieldStorageConfigStorage::mapToStorageRecord()
Maps from an entity object to the storage record.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity object.
Return value
array The record to store.
Overrides ConfigEntityStorage::mapToStorageRecord
File
- core/
modules/ field/ src/ FieldStorageConfigStorage.php, line 168 - Contains \Drupal\field\FieldStorageConfigStorage.
Class
- FieldStorageConfigStorage
- Controller class for "field storage" configuration entities.
Namespace
Drupal\fieldCode
protected function mapToStorageRecord(EntityInterface $entity) {
$record = parent::mapToStorageRecord($entity);
$class = $this->fieldTypeManager
->getPluginClass($record['type']);
$record['settings'] = $class::storageSettingsToConfigData($record['settings']);
return $record;
}