You are here

public function OpignoAnswerStorage::revisionIds in Opigno module 3.x

Same name and namespace in other branches
  1. 8 src/OpignoAnswerStorage.php \Drupal\opigno_module\OpignoAnswerStorage::revisionIds()

Gets a list of Answer revision IDs for a specific Answer.

Parameters

\Drupal\opigno_module\Entity\OpignoAnswerInterface $entity: The Answer entity.

Return value

int[] Answer revision IDs (in ascending order).

Overrides OpignoAnswerStorageInterface::revisionIds

File

src/OpignoAnswerStorage.php, line 23

Class

OpignoAnswerStorage
Defines the storage handler class for Answer entities.

Namespace

Drupal\opigno_module

Code

public function revisionIds(OpignoAnswerInterface $entity) {
  return $this->database
    ->query('SELECT vid FROM {opigno_answer_revision} WHERE id=:id ORDER BY vid', [
    ':id' => $entity
      ->id(),
  ])
    ->fetchCol();
}