You are here

public function TypeProcessorPluginManager::getInstanceByFieldType in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Processors/Type/TypeProcessorPluginManager.php \Drupal\content_synchronizer\Processors\Type\TypeProcessorPluginManager::getInstanceByFieldType()
  2. 3.x src/Processors/Type/TypeProcessorPluginManager.php \Drupal\content_synchronizer\Processors\Type\TypeProcessorPluginManager::getInstanceByFieldType()

Return the plugin by field type.

File

src/Processors/Type/TypeProcessorPluginManager.php, line 36

Class

TypeProcessorPluginManager
The type processor manager.

Namespace

Drupal\content_synchronizer\Processors\Type

Code

public function getInstanceByFieldType($fieldType) {
  foreach ($this
    ->getDefinitions() as $pluginId => $definition) {
    if ($definition['fieldType'] == $fieldType) {
      return self::createInstance($pluginId, []);
    }
  }
  return NULL;
}