You are here

public function EasyEmailStorage::userRevisionIds in Easy Email 8

Same name and namespace in other branches
  1. 2.0.x src/EasyEmailStorage.php \Drupal\easy_email\EasyEmailStorage::userRevisionIds()

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

Parameters

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

Return value

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

Overrides EasyEmailStorageInterface::userRevisionIds

File

src/EasyEmailStorage.php, line 104

Class

EasyEmailStorage
Defines the storage handler class for Email entities.

Namespace

Drupal\easy_email

Code

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