You are here

public function PhotosImageStorage::userRevisionIds in Album Photos 6.0.x

Same name and namespace in other branches
  1. 8.5 src/PhotosImageStorage.php \Drupal\photos\PhotosImageStorage::userRevisionIds()

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

Parameters

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

Return value

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

Overrides PhotosImageStorageInterface::userRevisionIds

File

src/PhotosImageStorage.php, line 30

Class

PhotosImageStorage
Defines the storage handler class for photos images.

Namespace

Drupal\photos

Code

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