This repository has been archived on 2022-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
opencase/modules/opencase_cases/src/OCActorCaseRelationStorageI...

62 lines
1.8 KiB
PHP

<?php
namespace Drupal\opencase_cases;
use Drupal\Core\Entity\ContentEntityStorageInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\opencase_cases\Entity\OCActorCaseRelationInterface;
/**
* Defines the storage handler class for Actor-Case Relation entities.
*
* This extends the base storage class, adding required special handling for
* Actor-Case Relation entities.
*
* @ingroup opencase_cases
*/
interface OCActorCaseRelationStorageInterface extends ContentEntityStorageInterface {
/**
* Gets a list of Actor-Case Relation revision IDs for a specific Actor-Case Relation.
*
* @param \Drupal\opencase_cases\Entity\OCActorCaseRelationInterface $entity
* The Actor-Case Relation entity.
*
* @return int[]
* Actor-Case Relation revision IDs (in ascending order).
*/
public function revisionIds(OCActorCaseRelationInterface $entity);
/**
* Gets a list of revision IDs having a given user as Actor-Case Relation author.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user entity.
*
* @return int[]
* Actor-Case Relation revision IDs (in ascending order).
*/
public function userRevisionIds(AccountInterface $account);
/**
* Counts the number of revisions in the default language.
*
* @param \Drupal\opencase_cases\Entity\OCActorCaseRelationInterface $entity
* The Actor-Case Relation entity.
*
* @return int
* The number of revisions in the default language.
*/
public function countDefaultLanguageRevisions(OCActorCaseRelationInterface $entity);
/**
* Unsets the language for all Actor-Case Relation with the given language.
*
* @param \Drupal\Core\Language\LanguageInterface $language
* The language object.
*/
public function clearRevisionsLanguage(LanguageInterface $language);
}