You are here

public function ConsentAgreementStorage::userRevisionIds 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::userRevisionIds()
  2. 3.0.x modules/gdpr_consent/src/ConsentAgreementStorage.php \Drupal\gdpr_consent\ConsentAgreementStorage::userRevisionIds()

Gets a list of revision IDs for a given user as Consent Agreement author.

Parameters

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

Return value

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

Overrides ConsentAgreementStorageInterface::userRevisionIds

File

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

Class

ConsentAgreementStorage
Defines the storage handler class for Consent Agreement entities.

Namespace

Drupal\gdpr_consent

Code

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