public function Exporter::setMode in Default Content Deploy 8
Set type of export.
Parameters
string $mode: Value type of export.
Return value
\Drupal\default_content_deploy\Exporter
Throws
\Exception
File
- src/
Exporter.php, line 227
Class
- Exporter
- A service for handling export of default content.
Namespace
Drupal\default_content_deployCode
public function setMode($mode) {
$available_modes = [
'all',
'reference',
'default',
];
if (in_array($mode, $available_modes)) {
$this->mode = $mode;
}
else {
throw new \Exception('The selected mode is not available');
}
return $this;
}