interface ExporterInterface in Default Content for D8 8
Same name and namespace in other branches
- 2.0.x src/ExporterInterface.php \Drupal\default_content\ExporterInterface
An interface defining a default content exporter.
Hierarchy
- interface \Drupal\default_content\ExporterInterface
Expanded class hierarchy of ExporterInterface
All classes that implement ExporterInterface
1 file declares its use of ExporterInterface
- DefaultContentCommands.php in src/
Commands/ DefaultContentCommands.php
File
- src/
ExporterInterface.php, line 8
Namespace
Drupal\default_contentView source
interface ExporterInterface {
/**
* Exports a single entity as importContent expects it.
*
* @param string $entity_type_id
* The entity type ID.
* @param mixed $entity_id
* The entity ID to export.
*
* @return string
* The rendered export as hal.
*/
public function exportContent($entity_type_id, $entity_id);
/**
* Exports a single entity and all its referenced entity.
*
* @param string $entity_type_id
* The entity type ID.
* @param mixed $entity_id
* The entity ID to export.
*
* @return string[][]
* The serialized entities keyed by entity type and UUID.
*/
public function exportContentWithReferences($entity_type_id, $entity_id);
/**
* Exports all of the content defined in a module's info file.
*
* @param string $module_name
* The name of the module.
*
* @return string[][]
* The serialized entities keyed by entity type and UUID.
*
* @throws \InvalidArgumentException
* If any UUID is not found.
*/
public function exportModuleContent($module_name);
/**
* Writes an array of serialized entities to a given folder.
*
* @param string[][] $serialized_by_type
* An array of serialized entities keyed by entity type and UUID.
* @param string $folder
* The folder to write files into.
*/
public function writeDefaultContent(array $serialized_by_type, $folder);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExporterInterface:: |
public | function | Exports a single entity as importContent expects it. | 1 |
ExporterInterface:: |
public | function | Exports a single entity and all its referenced entity. | 1 |
ExporterInterface:: |
public | function | Exports all of the content defined in a module's info file. | 1 |
ExporterInterface:: |
public | function | Writes an array of serialized entities to a given folder. | 1 |