interface BlockContentInterface
Same name and namespace in other branches
- 11.x core/modules/block_content/src/BlockContentInterface.php \Drupal\block_content\BlockContentInterface
Provides an interface defining a custom block entity.
Hierarchy
- interface \Drupal\block_content\Access\RefinableDependentAccessInterface implements \Drupal\block_content\Access\DependentAccessInterface; interface \Drupal\Core\Entity\ContentEntityInterface implements \Drupal\Core\Entity\Traversable, \Drupal\Core\Entity\FieldableEntityInterface, \Drupal\Core\Entity\TranslatableRevisionableInterface, \Drupal\Core\Entity\SynchronizableInterface; interface \Drupal\Core\Entity\EntityChangedInterface implements \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Entity\EntityPublishedInterface implements \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Entity\RevisionLogInterface implements \Drupal\Core\Entity\RevisionableInterface
- interface \Drupal\block_content\BlockContentInterface implements \Drupal\Core\Entity\ContentEntityInterface, \Drupal\Core\Entity\EntityChangedInterface, \Drupal\Core\Entity\RevisionLogInterface, \Drupal\Core\Entity\EntityPublishedInterface, \Drupal\block_content\Access\RefinableDependentAccessInterface
Expanded class hierarchy of BlockContentInterface
All classes that implement BlockContentInterface
5 files declare their use of BlockContentInterface
- BlockContent.php in core/
modules/ block_content/ src/ Entity/ BlockContent.php - BlockContentEntityChangedConstraintValidator.php in core/
modules/ block_content/ src/ Plugin/ Validation/ Constraint/ BlockContentEntityChangedConstraintValidator.php - BlockContentGetDependencyEvent.php in core/
modules/ block_content/ src/ Event/ BlockContentGetDependencyEvent.php - MigrateCustomBlockTest.php in core/
modules/ block_content/ tests/ src/ Kernel/ Migrate/ d7/ MigrateCustomBlockTest.php - SetInlineBlockDependency.php in core/
modules/ layout_builder/ src/ EventSubscriber/ SetInlineBlockDependency.php
File
-
core/
modules/ block_content/ src/ BlockContentInterface.php, line 14
Namespace
Drupal\block_contentView source
interface BlockContentInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface, EntityPublishedInterface, RefinableDependentAccessInterface {
/**
* Sets the block description.
*
* @param string $info
* The block description.
*
* @return $this
* The class instance that this method is called on.
*/
public function setInfo($info);
/**
* Determines if the block is reusable or not.
*
* @return bool
* Returns TRUE if reusable and FALSE otherwise.
*/
public function isReusable();
/**
* Sets the block to be reusable.
*
* @return $this
*/
public function setReusable();
/**
* Sets the block to be non-reusable.
*
* @return $this
*/
public function setNonReusable();
/**
* Sets the theme value.
*
* When creating a new block content block from the block library, the user is
* redirected to the configure form for that block in the given theme. The
* theme is stored against the block when the block content add form is shown.
*
* @param string $theme
* The theme name.
*
* @return $this
* The class instance that this method is called on.
*/
public function setTheme($theme);
/**
* Gets the theme value.
*
* When creating a new block content block from the block library, the user is
* redirected to the configure form for that block in the given theme. The
* theme is stored against the block when the block content add form is shown.
*
* @return string
* The theme name.
*/
public function getTheme();
/**
* Gets the configured instances of this custom block.
*
* @return array
* Array of Drupal\block\Core\Plugin\Entity\Block entities.
*/
public function getInstances();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.