You are here

protected function ImportContentCommand::execute in Tome 8

Overrides ImportCommand::execute

File

modules/tome_sync/src/Commands/ImportContentCommand.php, line 29

Class

ImportContentCommand
Contains the tome:import-content command.

Namespace

Drupal\tome_sync\Commands

Code

protected function execute(InputInterface $input, OutputInterface $output) {
  $names = $input
    ->getArgument('names');
  $names = explode(',', $names);
  foreach ($names as $name) {
    list($entity_type_id, $uuid, $langcode) = TomeSyncHelper::getPartsFromContentName($name);
    $this->importer
      ->importContent($entity_type_id, $uuid, $langcode);
  }
}