You are here

public function ConsentAgreementStorage::revisionIds in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_consent/src/ConsentAgreementStorage.php \Drupal\gdpr_consent\ConsentAgreementStorage::revisionIds()
  2. 3.0.x modules/gdpr_consent/src/ConsentAgreementStorage.php \Drupal\gdpr_consent\ConsentAgreementStorage::revisionIds()

Gets a list of Consent Agreement revision IDs for a specific Agreement.

Parameters

\Drupal\gdpr_consent\Entity\ConsentAgreementInterface $entity: The Consent Agreement entity.

Return value

int[] Consent Agreement revision IDs (in ascending order).

Overrides ConsentAgreementStorageInterface::revisionIds

File

modules/gdpr_consent/src/ConsentAgreementStorage.php, line 23

Class

ConsentAgreementStorage
Defines the storage handler class for Consent Agreement entities.

Namespace

Drupal\gdpr_consent

Code

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