You are here

interface DefaultContentManagerInterface in Default Content 8

An interface defining a default content importer.

Hierarchy

Expanded class hierarchy of DefaultContentManagerInterface

All classes that implement DefaultContentManagerInterface

File

src/DefaultContentManagerInterface.php, line 14
Contains \Drupal\defaultcontent\DefaultContentManager.

Namespace

Drupal\defaultcontent
View source
interface DefaultContentManagerInterface {

  /**
   * Set the scanner.
   *
   * @param \Drupal\defaultcontent\DefaultContentScanner $scanner
   *   The system scanner.
   */
  public function setScanner(DefaultContentScanner $scanner);

  /**
   * Imports default content for a given module.
   *
   * @param string $module
   *   The module to create the default content for.
   *
   * @return array[\Drupal\Core\Entity\EntityInterface]
   *   The created entities.
   */
  public function importContent($module);

  /**
   * Exports a single entity as importContent expects it.
   *
   * @param EntityInterface $entity
   *   The entity type ID.
   *
   * @return string
   *   The rendered export as hal.
   */
  public function exportContentWithMenuLinks($entity_type_id, $entity_id);

  /**
   * Exports a single entity and all its referenced entity.
   *
   * @param EntityInterface $entity
   *   The entity type ID.
   *
   * @return string[][]
   *   The serialized entities keyed by entity type and UUID.
   */
  public function exportContentWithReferences($entity_type_id, $entity_id);

}

Members

Namesort descending Modifiers Type Description Overrides
DefaultContentManagerInterface::exportContentWithMenuLinks public function Exports a single entity as importContent expects it. 1
DefaultContentManagerInterface::exportContentWithReferences public function Exports a single entity and all its referenced entity. 1
DefaultContentManagerInterface::importContent public function Imports default content for a given module. 1
DefaultContentManagerInterface::setScanner public function Set the scanner. 1