You are here

public function SitewideAlertStorage::revisionIds in Sitewide Alert 8

Gets a list of Sitewide Alert revision IDs for a specific Sitewide Alert.

Parameters

\Drupal\sitewide_alert\Entity\SitewideAlertInterface $entity: The Sitewide Alert entity.

Return value

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

Overrides SitewideAlertStorageInterface::revisionIds

File

src/SitewideAlertStorage.php, line 23

Class

SitewideAlertStorage
Defines the storage handler class for Sitewide Alert entities.

Namespace

Drupal\sitewide_alert

Code

public function revisionIds(SitewideAlertInterface $entity) {
  return $this->database
    ->query('SELECT vid FROM {sitewide_alert_revision} WHERE id=:id ORDER BY vid', [
    ':id' => $entity
      ->id(),
  ])
    ->fetchCol();
}