function ConfigEntityStorage::mapToStorageRecord

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::mapToStorageRecord()
  2. 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::mapToStorageRecord()
  3. 11.x core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::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.

1 call to ConfigEntityStorage::mapToStorageRecord()
ConfigEntityStorage::doSave in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
Performs storage-specific saving of the entity.
3 methods override ConfigEntityStorage::mapToStorageRecord()
FieldConfigStorageBase::mapToStorageRecord in core/lib/Drupal/Core/Field/FieldConfigStorageBase.php
Maps from an entity object to the storage record.
FieldStorageConfigStorage::mapToStorageRecord in core/modules/field/src/FieldStorageConfigStorage.php
Maps from an entity object to the storage record.
LayoutBuilderEntityViewDisplayStorage::mapToStorageRecord in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplayStorage.php
Maps from an entity object to the storage record.

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php, line 304

Class

ConfigEntityStorage
Defines the storage class for configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

protected function mapToStorageRecord(EntityInterface $entity) {
    return $entity->toArray();
}

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