annotate core/modules/block_content/src/BlockContentInterface.php @ 19:fa3358dc1485 tip

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