Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / forum / src / ForumIndexStorageInterface.php
1 <?php
2
3 namespace Drupal\forum;
4
5 use Drupal\node\NodeInterface;
6
7
8 /**
9  * Handles CRUD operations to {forum_index} table.
10  */
11 interface ForumIndexStorageInterface {
12
13   /**
14    * Returns the forum term id associated with an existing forum node.
15    *
16    * @param \Drupal\node\NodeInterface $node
17    *   The existing forum node.
18    *
19    * @return int
20    *   The forum term id currently associated with the node.
21    */
22   public function getOriginalTermId(NodeInterface $node);
23
24   /**
25    * Creates a record in {forum} table for the given node.
26    *
27    * @param \Drupal\node\NodeInterface $node
28    *   The node for which the record is to be created.
29    */
30   public function create(NodeInterface $node);
31
32   /**
33    * Reads an array of {forum} records for the given revision ids.
34    *
35    * @param array $vids
36    *   An array of node revision ids.
37    *
38    * @return \Drupal\Core\Database\StatementInterface
39    *   The records from {forum} for the given vids.
40    */
41   public function read(array $vids);
42
43   /**
44    * Updates the {forum} table for the given node.
45    *
46    * @param \Drupal\node\NodeInterface $node
47    *   The node for which the record is to be updated.
48    */
49   public function update(NodeInterface $node);
50
51   /**
52    * Deletes the records in {forum} table for the given node.
53    *
54    * @param \Drupal\node\NodeInterface $node
55    *   The node for which the records are to be deleted.
56    */
57   public function delete(NodeInterface $node);
58
59   /**
60    * Deletes the records in {forum} table for a given node revision.
61    *
62    * @param \Drupal\node\NodeInterface $node
63    *   The node revision for which the records are to be deleted.
64    */
65   public function deleteRevision(NodeInterface $node);
66
67   /**
68    * Creates a {forum_index} entry for the given node.
69    *
70    * @param \Drupal\node\NodeInterface $node
71    *   The node for which the index records are to be created.
72    */
73   public function createIndex(NodeInterface $node);
74
75   /**
76    * Updates the {forum_index} records for a given node.
77    *
78    * @param \Drupal\node\NodeInterface $node
79    *   The node for which the index records are to be updated.
80    */
81   public function updateIndex(NodeInterface $node);
82
83   /**
84    * Deletes the {forum_index} records for a given node.
85    *
86    * @param \Drupal\node\NodeInterface $node
87    *   The node for which the index records are to be deleted.
88    */
89   public function deleteIndex(NodeInterface $node);
90
91 }