1 {% extends "base/class.php.twig" %}
4 \Drupal\{{ module }}\{{ entity_class }}StorageInterface.
7 {% block namespace_class %}
8 namespace Drupal\{{ module }};
12 use Drupal\Core\Entity\ContentEntityStorageInterface;
13 use Drupal\Core\Session\AccountInterface;
14 use Drupal\Core\Language\LanguageInterface;
15 use Drupal\{{ module }}\Entity\{{ entity_class }}Interface;
18 {% block class_declaration %}
20 * Defines the storage handler class for {{ label }} entities.
22 * This extends the base storage class, adding required special handling for
23 * {{ label }} entities.
25 * @ingroup {{ module }}
27 interface {{ entity_class }}StorageInterface extends ContentEntityStorageInterface {% endblock %}
29 {% block class_methods %}
31 * Gets a list of {{ label }} revision IDs for a specific {{ label }}.
33 * @param \Drupal\{{ module }}\Entity\{{ entity_class }}Interface $entity
34 * The {{ label }} entity.
37 * {{ label }} revision IDs (in ascending order).
39 public function revisionIds({{ entity_class }}Interface $entity);
42 * Gets a list of revision IDs having a given user as {{ label }} author.
44 * @param \Drupal\Core\Session\AccountInterface $account
48 * {{ label }} revision IDs (in ascending order).
50 public function userRevisionIds(AccountInterface $account);
53 * Counts the number of revisions in the default language.
55 * @param \Drupal\{{ module }}\Entity\{{ entity_class }}Interface $entity
56 * The {{ label }} entity.
59 * The number of revisions in the default language.
61 public function countDefaultLanguageRevisions({{ entity_class }}Interface $entity);
64 * Unsets the language for all {{ label }} with the given language.
66 * @param \Drupal\Core\Language\LanguageInterface $language
67 * The language object.
69 public function clearRevisionsLanguage(LanguageInterface $language);