Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getProcess()
 {
     if (!$this->init) {
         $this->init = TRUE;
         $source_plugin = $this->migrationPluginManager->createInstance($this->pluginId)->getSourcePlugin();
         if ($source_plugin instanceof RequirementsInterface) {
             try {
                 $source_plugin->checkRequirements();
             } catch (RequirementsException $e) {
                 // Kill the rest of the method.
                 $source_plugin = [];
             }
         }
         foreach ($source_plugin as $row) {
             $field_type = $row->getSourceProperty('type');
             if (!isset($this->processedFieldTypes[$field_type]) && $this->cckPluginManager->hasDefinition($field_type)) {
                 $this->processedFieldTypes[$field_type] = TRUE;
                 // Allow the cckfield plugin to alter the migration as necessary so
                 // that it knows how to handle fields of this type.
                 if (!isset($this->cckPluginCache[$field_type])) {
                     $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, [], $this);
                 }
                 call_user_func([$this->cckPluginCache[$field_type], $this->pluginDefinition['cck_plugin_method']], $this);
             }
         }
     }
     return parent::getProcess();
 }