public function loadProcessorPlugins(&$values, $item, $entity_type) {
    $manager = \Drupal::service('plugin.manager.import_processor');
    $import_processors = $manager->getDefinitions();
    foreach ($import_processors as $plugin_id => $import_processor) {
      if ($import_processor['type'] == $entity_type . ':' . $item['type']) {
        /** @var \Drupal\govcms8_default_content\ImportProcessorBase $processor */
        $processor = $manager->createInstance($plugin_id);
        $processor->setItem($item);
        $processor->process($values);
      }
    }
  }
public function loadProcessorPlugins(&$values, $item, $entity_type) {
    $manager = \Drupal::service('plugin.manager.import_processor');
    $import_processors = $manager->getDefinitions();
    foreach ($import_processors as $plugin_id => $import_processor) {
      if ($import_processor['type'] == $entity_type . ':' . $item['type']) {
        /** @var \Drupal\govcms8_default_content\ImportProcessorBase $processor */
        $processor = $manager->createInstance($plugin_id);
        $processor->setItem($item);
        $processor->process($values);
      }
    }
  }
public function loadProcessorPlugins ( & $ values , $ item , $ entity_type ) { $ manager = \ Drupal :: service ( 'plugin.manager.import_processor' ) ; $ import_processors = $ manager -> getDefinitions ( ) ; foreach ( $ import_processors as $ plugin_id => $ import_processor ) { if ( $ import_processor [ 'type' ] == $ entity_type . ':' . $ item [ 'type' ] ) { /** @var \Drupal\govcms8_default_content\ImportProcessorBase $processor */ $ processor = $ manager -> createInstance ( $ plugin_id ) ; $ processor -> setItem ( $ item ) ; $ processor -> process ( $ values ) ; } } }
Helper method used to load the correct plugin.
Helper method used to load the correct plugin .