You are here

public function PetStorage::userRevisionIds in Previewable email templates 8.3

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

Parameters

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

Return value

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

Overrides PetStorageInterface::userRevisionIds

File

src/PetStorage.php, line 33

Class

PetStorage
Defines the storage handler class for Pet entities.

Namespace

Drupal\pet

Code

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