You are here

public function InvoiceStorage::userRevisionIds in Drupal PM (Project Management) 4.x

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

Parameters

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

Return value

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

Overrides InvoiceStorageInterface::userRevisionIds

File

modules/pm_invoice/src/InvoiceStorage.php, line 32

Class

InvoiceStorage
Defines the storage handler class for Invoice entities.

Namespace

Drupal\pm_invoice

Code

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