interface ExporterInterface in Default Content for D8 2.0.x
Same name and namespace in other branches
- 8 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.
* @param string|null $destination
* (optional) A file name to write the exported entity into. File entities
* also export their files into the same folder.
*
* @return string
* The rendered export as hal.
*/
public function exportContent($entity_type_id, $entity_id, $destination = NULL);
/**
* 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.
* @param string|null $folder
* (optional) A folder to write the exported entities into, grouped by
* entity type. File entities also export their files into the same folder.
*
* @return string[][]
* The serialized entities keyed by entity type and UUID.
*/
public function exportContentWithReferences($entity_type_id, $entity_id, $folder = NULL);
/**
* Exports all of the content defined in a module's info file.
*
* @param string $module_name
* The name of the module.
* @param string|null $folder
* (optional) A folder to write the exported entities into, grouped by
* entity type. File entities also export their files into the same folder.
*
* @return string[][]
* The serialized entities keyed by entity type and UUID.
*
* @throws \InvalidArgumentException
* If any UUID is not found.
*/
public function exportModuleContent($module_name, $folder = NULL);
}
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 |