IssueStorage.php in Drupal PM (Project Management) 4.x
File
modules/pm_issue/src/IssueStorage.php
View source
<?php
namespace Drupal\pm_issue;
use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
use Drupal\Core\Session\AccountInterface;
use Drupal\pm_issue\Entity\IssueInterface;
class IssueStorage extends SqlContentEntityStorage implements IssueStorageInterface {
public function revisionIds(IssueInterface $entity) {
return $this->database
->query('SELECT vid FROM {pm_issue_revision} WHERE id=:id ORDER BY vid', [
':id' => $entity
->id(),
])
->fetchCol();
}
public function userRevisionIds(AccountInterface $account) {
return $this->database
->query('SELECT vid FROM {pm_issue_field_revision} WHERE uid = :uid ORDER BY vid', [
':uid' => $account
->id(),
])
->fetchCol();
}
}
Classes
Name |
Description |
IssueStorage |
Defines the storage handler class for Issue entities. |