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