Pull merge.
[yaffs-website] / web / core / lib / Drupal / Core / Entity / ContentEntityNullStorage.php
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 use Drupal\Core\Field\FieldDefinitionInterface;
6
7 /**
8  * Defines a null entity storage.
9  *
10  * Used for content entity types that have no storage.
11  */
12 class ContentEntityNullStorage extends ContentEntityStorageBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function loadMultiple(array $ids = NULL) {
18     return [];
19   }
20
21   /**
22    * {@inheritdoc}
23    */
24   protected function doLoadMultiple(array $ids = NULL) {
25   }
26
27   /**
28    * {@inheritdoc}
29    */
30   public function load($id) {
31     return NULL;
32   }
33
34   /**
35    * {@inheritdoc}
36    */
37   public function loadRevision($revision_id) {
38     return NULL;
39   }
40
41   /**
42    * {@inheritdoc}
43    */
44   public function loadMultipleRevisions(array $revision_ids) {
45     return [];
46   }
47
48   /**
49    * {@inheritdoc}
50    */
51   public function deleteRevision($revision_id) {
52   }
53
54   /**
55    * {@inheritdoc}
56    */
57   public function loadByProperties(array $values = []) {
58     return [];
59   }
60
61   /**
62    * {@inheritdoc}
63    */
64   public function delete(array $entities) {
65   }
66
67   /**
68    * {@inheritdoc}
69    */
70   protected function doDelete($entities) {
71   }
72
73   /**
74    * {@inheritdoc}
75    */
76   public function save(EntityInterface $entity) {
77   }
78
79   /**
80    * {@inheritdoc}
81    */
82   protected function getQueryServiceName() {
83     return 'entity.query.null';
84   }
85
86   /**
87    * {@inheritdoc}
88    */
89   protected function doLoadRevisionFieldItems($revision_id) {
90   }
91
92   /**
93    * {@inheritdoc}
94    */
95   protected function doSaveFieldItems(ContentEntityInterface $entity, array $names = []) {
96   }
97
98   /**
99    * {@inheritdoc}
100    */
101   protected function doDeleteFieldItems($entities) {
102   }
103
104   /**
105    * {@inheritdoc}
106    */
107   protected function doDeleteRevisionFieldItems(ContentEntityInterface $revision) {
108   }
109
110   /**
111    * {@inheritdoc}
112    */
113   protected function readFieldItemsToPurge(FieldDefinitionInterface $field_definition, $batch_size) {
114     return [];
115   }
116
117   /**
118    * {@inheritdoc}
119    */
120   protected function purgeFieldItems(ContentEntityInterface $entity, FieldDefinitionInterface $field_definition) {
121   }
122
123   /**
124    * {@inheritdoc}
125    */
126   protected function doSave($id, EntityInterface $entity) {
127   }
128
129   /**
130    * {@inheritdoc}
131    */
132   protected function has($id, EntityInterface $entity) {
133   }
134
135   /**
136    * {@inheritdoc}
137    */
138   public function countFieldData($storage_definition, $as_bool = FALSE) {
139     return $as_bool ? FALSE : 0;
140   }
141
142   /**
143    * {@inheritdoc}
144    */
145   public function hasData() {
146     return FALSE;
147   }
148
149 }