interface DefaultContentManagerInterface in Default Content 8
An interface defining a default content importer.
Hierarchy
- interface \Drupal\defaultcontent\DefaultContentManagerInterface
Expanded class hierarchy of DefaultContentManagerInterface
All classes that implement DefaultContentManagerInterface
File
- src/
DefaultContentManagerInterface.php, line 14 - Contains \Drupal\defaultcontent\DefaultContentManager.
Namespace
Drupal\defaultcontentView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultContentManagerInterface:: |
public | function | Exports a single entity as importContent expects it. | 1 |
DefaultContentManagerInterface:: |
public | function | Exports a single entity and all its referenced entity. | 1 |
DefaultContentManagerInterface:: |
public | function | Imports default content for a given module. | 1 |
DefaultContentManagerInterface:: |
public | function | Set the scanner. | 1 |