You are here

public function OpignoAnswerStorage::userRevisionIds in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/OpignoAnswerStorage.php \Drupal\opigno_module\OpignoAnswerStorage::userRevisionIds()

Gets a list of revision IDs having a given user as Answer author.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user entity.

Return value

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

Overrides OpignoAnswerStorageInterface::userRevisionIds

File

src/OpignoAnswerStorage.php, line 33

Class

OpignoAnswerStorage
Defines the storage handler class for Answer entities.

Namespace

Drupal\opigno_module

Code

public function userRevisionIds(AccountInterface $account) {
  return $this->database
    ->query('SELECT vid FROM {opigno_answer_field_revision} WHERE uid = :uid ORDER BY vid', [
    ':uid' => $account
      ->id(),
  ])
    ->fetchCol();
}