function FieldStorageConfigStorage::mapToStorageRecord

Same name in other branches
  1. 9 core/modules/field/src/FieldStorageConfigStorage.php \Drupal\field\FieldStorageConfigStorage::mapToStorageRecord()
  2. 8.9.x core/modules/field/src/FieldStorageConfigStorage.php \Drupal\field\FieldStorageConfigStorage::mapToStorageRecord()
  3. 10 core/modules/field/src/FieldStorageConfigStorage.php \Drupal\field\FieldStorageConfigStorage::mapToStorageRecord()

Overrides ConfigEntityStorage::mapToStorageRecord

File

core/modules/field/src/FieldStorageConfigStorage.php, line 177

Class

FieldStorageConfigStorage
Storage handler for "field storage" configuration entities.

Namespace

Drupal\field

Code

protected function mapToStorageRecord(EntityInterface $entity) {
    $record = parent::mapToStorageRecord($entity);
    $class = $this->fieldTypeManager
        ->getPluginClass($record['type']);
    $record['settings'] = $class::storageSettingsToConfigData($record['settings']);
    return $record;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.