3 namespace Drupal\block_content;
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
7 use Drupal\Core\Entity\EntityPublishedInterface;
8 use Drupal\Core\Entity\RevisionLogInterface;
11 * Provides an interface defining a custom block entity.
13 interface BlockContentInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface, EntityPublishedInterface {
16 * Returns the block revision log message.
19 * The revision log message.
21 * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
22 * \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage() instead.
24 public function getRevisionLog();
27 * Sets the block description.
30 * The block description.
32 * @return \Drupal\block_content\BlockContentInterface
33 * The class instance that this method is called on.
35 public function setInfo($info);
38 * Sets the block revision log message.
40 * @param string $revision_log
41 * The revision log message.
43 * @return \Drupal\block_content\BlockContentInterface
44 * The class instance that this method is called on.
46 * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
47 * \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage() instead.
49 public function setRevisionLog($revision_log);
52 * Sets the theme value.
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.
58 * @param string $theme
61 * @return \Drupal\block_content\BlockContentInterface
62 * The class instance that this method is called on.
64 public function setTheme($theme);
67 * Gets the theme value.
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.
76 public function getTheme();
79 * Gets the configured instances of this custom block.
82 * Array of Drupal\block\Core\Plugin\Entity\Block entities.
84 public function getInstances();