public function Exporter::setEntityTypeId in Default Content Deploy 8
Set entity type ID.
Parameters
string $entity_type: Entity Type.
Return value
\Drupal\default_content_deploy\Exporter
1 call to Exporter::setEntityTypeId()
- Exporter::prepareToExportAllContent in src/
Exporter.php - Prepare all content on the site to export.
File
- src/
Exporter.php, line 166
Class
- Exporter
- A service for handling export of default content.
Namespace
Drupal\default_content_deployCode
public function setEntityTypeId($entity_type) {
$content_entity_types = $this->deployManager
->getContentEntityTypes();
if (!array_key_exists($entity_type, $content_entity_types)) {
throw new \InvalidArgumentException(sprintf('Entity type "%s" does not exist', $entity_type));
}
$this->entityTypeId = (string) $entity_type;
return $this;
}