W3cubDocs

/Drupal 8

protected function SqlContentEntityStorage::mapToDataStorageRecord

protected SqlContentEntityStorage::mapToDataStorageRecord(EntityInterface $entity, $table_name = NULL)

Maps from an entity object to the storage record of the field data.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity object.

string $table_name: (optional) The table name to map records to. Defaults to the data table.

Return value

\stdClass The record to store.

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 1002

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

protected function mapToDataStorageRecord(EntityInterface $entity, $table_name = NULL) {
  if (!isset($table_name)) {
    $table_name = $this->dataTable;
  }
  $record = $this->mapToStorageRecord($entity, $table_name);
  return $record;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Sql!SqlContentEntityStorage.php/function/SqlContentEntityStorage::mapToDataStorageRecord/8.1.x