5 use Drupal\Core\Entity\ContentEntityStorageInterface;
6 use Drupal\Core\Language\LanguageInterface;
7 use Drupal\Core\Session\AccountInterface;
10 * Defines an interface for node entity storage classes.
12 interface NodeStorageInterface extends ContentEntityStorageInterface {
15 * Gets a list of node revision IDs for a specific node.
17 * @param \Drupal\node\NodeInterface $node
21 * Node revision IDs (in ascending order).
23 public function revisionIds(NodeInterface $node);
26 * Gets a list of revision IDs having a given user as node author.
28 * @param \Drupal\Core\Session\AccountInterface $account
32 * Node revision IDs (in ascending order).
34 public function userRevisionIds(AccountInterface $account);
37 * Counts the number of revisions in the default language.
39 * @param \Drupal\node\NodeInterface $node
43 * The number of revisions in the default language.
45 public function countDefaultLanguageRevisions(NodeInterface $node);
48 * Updates all nodes of one type to be of another type.
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.
56 * The number of nodes whose node type field was modified.
58 public function updateType($old_type, $new_type);
61 * Unsets the language for all nodes with the given language.
63 * @param \Drupal\Core\Language\LanguageInterface $language
64 * The language object.
66 public function clearRevisionsLanguage(LanguageInterface $language);