Error message

  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).

protected function ConfigSource::getConfigProcessor

Returns the config processor for a given configuration definition.

Parameters

\Drupal\Core\TypedData\TraversableTypedDataInterface $definition: The field type.

Return value

\Drupal\tmgmt_config\ConfigProcessorInterface The config processor for this configuration definition.

2 calls to ConfigSource::getConfigProcessor()
ConfigSource::getData in sources/tmgmt_config/src/Plugin/tmgmt/Source/ConfigSource.php
Implements TMGMTEntitySourcePluginController::getData().
ConfigSource::saveTranslation in sources/tmgmt_config/src/Plugin/tmgmt/Source/ConfigSource.php
Saves a translation.

File

sources/tmgmt_config/src/Plugin/tmgmt/Source/ConfigSource.php, line 235

Class

ConfigSource
Content entity source plugin controller.

Namespace

Drupal\tmgmt_config\Plugin\tmgmt\Source

Code

protected function getConfigProcessor(TraversableTypedDataInterface $definition) {
  $class = DefaultConfigProcessor::class;
  $data_definition = $definition
    ->getDataDefinition();
  if (method_exists($data_definition, 'toArray')) {
    $array_definition = $data_definition
      ->toArray();
    if (!empty($array_definition['tmgmt_config_processor'])) {
      $class = $array_definition['tmgmt_config_processor'];
    }
  }
  return \Drupal::service('class_resolver')
    ->getInstanceFromDefinition($class);
}