protected function DatabaseStorageControllerNG::mapToRevisionStorageRecord

Maps from an entity object to the storage record of the revision table.

1 call to DatabaseStorageControllerNG::mapToRevisionStorageRecord()
DatabaseStorageControllerNG::saveRevision in drupal/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php
Saves an entity revision.

File

drupal/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php, line 309
Definition of Drupal\Core\Entity\DatabaseStorageControllerNG.

Class

DatabaseStorageControllerNG
Implements Field API specific enhancements to the DatabaseStorageController class.

Namespace

Drupal\Core\Entity

Code

protected function mapToRevisionStorageRecord(EntityInterface $entity) {
  $record = new \stdClass();
  foreach ($this->entityInfo['schema_fields_sql']['revision_table'] as $name) {
    $record->{$name} = $entity->{$name}->value;
  }
  return $record;
}