3 namespace Drupal\block_content;
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
7 use Drupal\Core\Entity\RevisionLogInterface;
10 * Provides an interface defining a custom block entity.
12 interface BlockContentInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface {
15 * Returns the block revision log message.
18 * The revision log message.
20 * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
21 * \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage() instead.
23 public function getRevisionLog();
26 * Sets the block description.
29 * The block description.
31 * @return \Drupal\block_content\BlockContentInterface
32 * The class instance that this method is called on.
34 public function setInfo($info);
37 * Sets the block revision log message.
39 * @param string $revision_log
40 * The revision log message.
42 * @return \Drupal\block_content\BlockContentInterface
43 * The class instance that this method is called on.
45 * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
46 * \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage() instead.
48 public function setRevisionLog($revision_log);
51 * Sets the theme value.
53 * When creating a new block content block from the block library, the user is
54 * redirected to the configure form for that block in the given theme. The
55 * theme is stored against the block when the block content add form is shown.
57 * @param string $theme
60 * @return \Drupal\block_content\BlockContentInterface
61 * The class instance that this method is called on.
63 public function setTheme($theme);
66 * Gets the theme value.
68 * When creating a new block content block from the block library, the user is
69 * redirected to the configure form for that block in the given theme. The
70 * theme is stored against the block when the block content add form is shown.
75 public function getTheme();
78 * Gets the configured instances of this custom block.
81 * Array of Drupal\block\Core\Plugin\Entity\Block entities.
83 public function getInstances();