You are here

public function SitewideAlertStorage::userRevisionIds in Sitewide Alert 8

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

Parameters

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

Return value

int[] Sitewide Alert revision IDs (in ascending order).

Overrides SitewideAlertStorageInterface::userRevisionIds

File

src/SitewideAlertStorage.php, line 33

Class

SitewideAlertStorage
Defines the storage handler class for Sitewide Alert entities.

Namespace

Drupal\sitewide_alert

Code

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