Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / block_content / src / BlockContentInterface.php
1 <?php
2
3 namespace Drupal\block_content;
4
5 use Drupal\block_content\Access\RefinableDependentAccessInterface;
6 use Drupal\Core\Entity\ContentEntityInterface;
7 use Drupal\Core\Entity\EntityChangedInterface;
8 use Drupal\Core\Entity\EntityPublishedInterface;
9 use Drupal\Core\Entity\RevisionLogInterface;
10
11 /**
12  * Provides an interface defining a custom block entity.
13  */
14 interface BlockContentInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface, EntityPublishedInterface, RefinableDependentAccessInterface {
15
16   /**
17    * Returns the block revision log message.
18    *
19    * @return string
20    *   The revision log message.
21    *
22    * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
23    *   \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage() instead.
24    */
25   public function getRevisionLog();
26
27   /**
28    * Sets the block description.
29    *
30    * @param string $info
31    *   The block description.
32    *
33    * @return \Drupal\block_content\BlockContentInterface
34    *   The class instance that this method is called on.
35    */
36   public function setInfo($info);
37
38   /**
39    * Sets the block revision log message.
40    *
41    * @param string $revision_log
42    *   The revision log message.
43    *
44    * @return \Drupal\block_content\BlockContentInterface
45    *   The class instance that this method is called on.
46    *
47    * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
48    *   \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage() instead.
49    */
50   public function setRevisionLog($revision_log);
51
52   /**
53    * Determines if the block is reusable or not.
54    *
55    * @return bool
56    *   Returns TRUE if reusable and FALSE otherwise.
57    */
58   public function isReusable();
59
60   /**
61    * Sets the block to be reusable.
62    *
63    * @return $this
64    */
65   public function setReusable();
66
67   /**
68    * Sets the block to be non-reusable.
69    *
70    * @return $this
71    */
72   public function setNonReusable();
73
74   /**
75    * Sets the theme value.
76    *
77    * When creating a new block content block from the block library, the user is
78    * redirected to the configure form for that block in the given theme. The
79    * theme is stored against the block when the block content add form is shown.
80    *
81    * @param string $theme
82    *   The theme name.
83    *
84    * @return \Drupal\block_content\BlockContentInterface
85    *   The class instance that this method is called on.
86    */
87   public function setTheme($theme);
88
89   /**
90    * Gets the theme value.
91    *
92    * When creating a new block content block from the block library, the user is
93    * redirected to the configure form for that block in the given theme. The
94    * theme is stored against the block when the block content add form is shown.
95    *
96    * @return string
97    *   The theme name.
98    */
99   public function getTheme();
100
101   /**
102    * Gets the configured instances of this custom block.
103    *
104    * @return array
105    *   Array of Drupal\block\Core\Plugin\Entity\Block entities.
106    */
107   public function getInstances();
108
109 }