function ConfigEntityStorage::mapToStorageRecord

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

4 calls to ConfigEntityStorage::mapToStorageRecord()
ConfigEntityStorage::doSave in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
Performs storage-specific saving of the entity.
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.
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 300

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.