You are here

protected function SequenceIndex::buildRecord in Multiversion 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Index/SequenceIndex.php \Drupal\multiversion\Entity\Index\SequenceIndex::buildRecord()

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity:

Return value

array

1 call to SequenceIndex::buildRecord()
SequenceIndex::add in src/Entity/Index/SequenceIndex.php

File

src/Entity/Index/SequenceIndex.php, line 105

Class

SequenceIndex

Namespace

Drupal\multiversion\Entity\Index

Code

protected function buildRecord(ContentEntityInterface $entity) {
  return [
    'entity_type_id' => $entity
      ->getEntityTypeId(),
    'entity_id' => $entity
      ->id(),
    'entity_uuid' => $entity
      ->uuid(),
    'revision_id' => $entity
      ->getRevisionId(),
    'deleted' => $entity->_deleted->value,
    'rev' => $entity->_rev->value,
    'seq' => $this->multiversionManager
      ->newSequenceId(),
    'local' => (bool) $entity
      ->getEntityType()
      ->get('local'),
    'is_stub' => (bool) $entity->_rev->is_stub,
  ];
}