FieldConfigStorageBase::mapFromStorageRecords

protected FieldConfigStorageBase::mapFromStorageRecords(array $records)

Maps from storage records to entity objects.

Parameters

array $records: Associative array of query results, keyed on the entity ID.

Return value

\Drupal\Core\Entity\EntityInterface[] An array of entity objects implementing the EntityInterface.

Overrides EntityStorageBase::mapFromStorageRecords

File

core/lib/Drupal/Core/Field/FieldConfigStorageBase.php, line 23

Class

FieldConfigStorageBase
Base storage class for field config entities.

Namespace

Drupal\Core\Field

Code

protected function mapFromStorageRecords(array $records) {
  foreach ($records as &$record) {
    $class = $this->fieldTypeManager->getPluginClass($record['field_type']);
    $record['settings'] = $class::fieldSettingsFromConfigData($record['settings']);
  }
  return parent::mapFromStorageRecords($records);
}
doc_Drupal
2016-10-29 09:11:22
Comments
Leave a Comment

Please login to continue.