InvoiceStorage.php in Drupal PM (Project Management) 4.x
File
modules/pm_invoice/src/InvoiceStorage.php
View source
<?php
namespace Drupal\pm_invoice;
use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
use Drupal\Core\Session\AccountInterface;
use Drupal\pm_invoice\Entity\InvoiceInterface;
class InvoiceStorage extends SqlContentEntityStorage implements InvoiceStorageInterface {
public function revisionIds(InvoiceInterface $entity) {
return $this->database
->query('SELECT vid FROM {pm_invoice_revision} WHERE id=:id ORDER BY vid', [
':id' => $entity
->id(),
])
->fetchCol();
}
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();
}
}