Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / block_content / src / BlockContentInterface.php
1 <?php
2
3 namespace Drupal\block_content;
4
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
7 use Drupal\Core\Entity\EntityPublishedInterface;
8 use Drupal\Core\Entity\RevisionLogInterface;
9
10 /**
11  * Provides an interface defining a custom block entity.
12  */
13 interface BlockContentInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface, EntityPublishedInterface {
14
15   /**
16    * Returns the block revision log message.
17    *
18    * @return string
19    *   The revision log message.
20    *
21    * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
22    *   \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage() instead.
23    */
24   public function getRevisionLog();
25
26   /**
27    * Sets the block description.
28    *
29    * @param string $info
30    *   The block description.
31    *
32    * @return \Drupal\block_content\BlockContentInterface
33    *   The class instance that this method is called on.
34    */
35   public function setInfo($info);
36
37   /**
38    * Sets the block revision log message.
39    *
40    * @param string $revision_log
41    *   The revision log message.
42    *
43    * @return \Drupal\block_content\BlockContentInterface
44    *   The class instance that this method is called on.
45    *
46    * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
47    *   \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage() instead.
48    */
49   public function setRevisionLog($revision_log);
50
51   /**
52    * Sets the theme value.
53    *
54    * When creating a new block content block from the block library, the user is
55    * redirected to the configure form for that block in the given theme. The
56    * theme is stored against the block when the block content add form is shown.
57    *
58    * @param string $theme
59    *   The theme name.
60    *
61    * @return \Drupal\block_content\BlockContentInterface
62    *   The class instance that this method is called on.
63    */
64   public function setTheme($theme);
65
66   /**
67    * Gets the theme value.
68    *
69    * When creating a new block content block from the block library, the user is
70    * redirected to the configure form for that block in the given theme. The
71    * theme is stored against the block when the block content add form is shown.
72    *
73    * @return string
74    *   The theme name.
75    */
76   public function getTheme();
77
78   /**
79    * Gets the configured instances of this custom block.
80    *
81    * @return array
82    *   Array of Drupal\block\Core\Plugin\Entity\Block entities.
83    */
84   public function getInstances();
85
86 }