Mercurial > hg > isophonics-drupal-site
comparison core/modules/node/src/NodeStorageInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\node; | |
4 | |
5 use Drupal\Core\Entity\ContentEntityStorageInterface; | |
6 use Drupal\Core\Language\LanguageInterface; | |
7 use Drupal\Core\Session\AccountInterface; | |
8 | |
9 /** | |
10 * Defines an interface for node entity storage classes. | |
11 */ | |
12 interface NodeStorageInterface extends ContentEntityStorageInterface { | |
13 | |
14 /** | |
15 * Gets a list of node revision IDs for a specific node. | |
16 * | |
17 * @param \Drupal\node\NodeInterface $node | |
18 * The node entity. | |
19 * | |
20 * @return int[] | |
21 * Node revision IDs (in ascending order). | |
22 */ | |
23 public function revisionIds(NodeInterface $node); | |
24 | |
25 /** | |
26 * Gets a list of revision IDs having a given user as node author. | |
27 * | |
28 * @param \Drupal\Core\Session\AccountInterface $account | |
29 * The user entity. | |
30 * | |
31 * @return int[] | |
32 * Node revision IDs (in ascending order). | |
33 */ | |
34 public function userRevisionIds(AccountInterface $account); | |
35 | |
36 /** | |
37 * Counts the number of revisions in the default language. | |
38 * | |
39 * @param \Drupal\node\NodeInterface $node | |
40 * The node entity. | |
41 * | |
42 * @return int | |
43 * The number of revisions in the default language. | |
44 */ | |
45 public function countDefaultLanguageRevisions(NodeInterface $node); | |
46 | |
47 /** | |
48 * Updates all nodes of one type to be of another type. | |
49 * | |
50 * @param string $old_type | |
51 * The current node type of the nodes. | |
52 * @param string $new_type | |
53 * The new node type of the nodes. | |
54 * | |
55 * @return int | |
56 * The number of nodes whose node type field was modified. | |
57 */ | |
58 public function updateType($old_type, $new_type); | |
59 | |
60 /** | |
61 * Unsets the language for all nodes with the given language. | |
62 * | |
63 * @param \Drupal\Core\Language\LanguageInterface $language | |
64 * The language object. | |
65 */ | |
66 public function clearRevisionsLanguage(LanguageInterface $language); | |
67 | |
68 } |