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