You are here

protected function FieldsSettingsForm::getPlugin in Diff 8

Returns a plugin object or NULL if no plugin could be found.

Parameters

array $configuration: The plugin configuration.

Return value

\Drupal\diff\FieldDiffBuilderInterface|null The plugin.

1 call to FieldsSettingsForm::getPlugin()
FieldsSettingsForm::buildFieldRow in src/Form/FieldsSettingsForm.php
Builds a row for the table. Each row corresponds to a field type.

File

src/Form/FieldsSettingsForm.php, line 503

Class

FieldsSettingsForm
Configure fields with their diff builder plugin settings.

Namespace

Drupal\diff\Form

Code

protected function getPlugin(array $configuration) {
  if ($configuration && isset($configuration['type']) && $configuration['type'] != 'hidden') {
    if (!isset($configuration['settings'])) {
      $configuration['settings'] = array();
    }
    return $this->diffBuilderManager
      ->createInstance($configuration['type'], $configuration['settings']);
  }
  return NULL;
}