You are here

interface DefaultContentHandlerInterface in Fixed Block Content 8

Default content handler interface for the fixed block content entity type.

Hierarchy

Expanded class hierarchy of DefaultContentHandlerInterface

All classes that implement DefaultContentHandlerInterface

File

src/DefaultContentHandlerInterface.php, line 10

Namespace

Drupal\fixed_block_content
View source
interface DefaultContentHandlerInterface extends EntityHandlerInterface {

  /**
   * Export the default content stored in config to a new custom block.
   *
   * @param \Drupal\fixed_block_content\FixedBlockContentInterface $fixed_block
   *   The fixed block to work with.
   *
   * @return \Drupal\block_content\BlockContentInterface
   *   The new custom block content (unsaved), NULL if no default content or
   *   there ware errors.
   */
  public function exportDefaultContent(FixedBlockContentInterface $fixed_block);

  /**
   * Sets the current content of the custom block as the fixed default content.
   *
   * @param \Drupal\fixed_block_content\FixedBlockContentInterface $fixed_block
   *   The fixed block to work with.
   */
  public function importDefaultContent(FixedBlockContentInterface $fixed_block);

}

Members

Namesort descending Modifiers Type Description Overrides
DefaultContentHandlerInterface::exportDefaultContent public function Export the default content stored in config to a new custom block. 1
DefaultContentHandlerInterface::importDefaultContent public function Sets the current content of the custom block as the fixed default content. 1
EntityHandlerInterface::createInstance public static function Instantiates a new instance of this entity handler. 13