Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / templates / module / src / interface-entity-storage.php.twig
1 {% extends "base/class.php.twig" %}
2
3 {% block file_path %}
4 \Drupal\{{ module }}\{{ entity_class }}StorageInterface.
5 {% endblock %}
6
7 {% block namespace_class %}
8 namespace Drupal\{{ module }};
9 {% endblock %}
10
11 {% block use_class %}
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;
16 {% endblock %}
17
18 {% block class_declaration %}
19 /**
20  * Defines the storage handler class for {{ label }} entities.
21  *
22  * This extends the base storage class, adding required special handling for
23  * {{ label }} entities.
24  *
25  * @ingroup {{ module }}
26  */
27 interface {{ entity_class }}StorageInterface extends ContentEntityStorageInterface {% endblock %}
28
29 {% block class_methods %}
30   /**
31    * Gets a list of {{ label }} revision IDs for a specific {{ label }}.
32    *
33    * @param \Drupal\{{ module }}\Entity\{{ entity_class }}Interface $entity
34    *   The {{ label }} entity.
35    *
36    * @return int[]
37    *   {{ label }} revision IDs (in ascending order).
38    */
39   public function revisionIds({{ entity_class }}Interface $entity);
40
41   /**
42    * Gets a list of revision IDs having a given user as {{ label }} author.
43    *
44    * @param \Drupal\Core\Session\AccountInterface $account
45    *   The user entity.
46    *
47    * @return int[]
48    *   {{ label }} revision IDs (in ascending order).
49    */
50   public function userRevisionIds(AccountInterface $account);
51
52   /**
53    * Counts the number of revisions in the default language.
54    *
55    * @param \Drupal\{{ module }}\Entity\{{ entity_class }}Interface $entity
56    *   The {{ label }} entity.
57    *
58    * @return int
59    *   The number of revisions in the default language.
60    */
61   public function countDefaultLanguageRevisions({{ entity_class }}Interface $entity);
62
63   /**
64    * Unsets the language for all {{ label }} with the given language.
65    *
66    * @param \Drupal\Core\Language\LanguageInterface $language
67    *   The language object.
68    */
69   public function clearRevisionsLanguage(LanguageInterface $language);
70 {% endblock %}