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