public function ContentSynchronizerCommands::synchronizerImportZip in Content Synchronizer 8.2
Same name and namespace in other branches
- 8 src/Commands/ContentSynchronizerCommands.php \Drupal\content_synchronizer\Commands\ContentSynchronizerCommands::synchronizerImportZip()
Import from zip : bind together csci & cslim.
@command content:synchronizer-import-zip @aliases csimzip
Parameters
string $file_path: Zip file path.
Throws
\Exception
File
- src/
Commands/ ContentSynchronizerCommands.php, line 284
Class
- ContentSynchronizerCommands
- A Drush commandfile.
Namespace
Drupal\content_synchronizer\CommandsCode
public function synchronizerImportZip($file_path) {
// 1 : create export.
$importId = $this
->synchronizerCreateImport($file_path, [
'as_function' => TRUE,
]);
// 2 : add all nodes of all node-types.
$this
->synchronizerLaunchImport($importId, [
'publish' => 'publish',
'update' => 'systematic',
]);
}