Gets the mapper ID.
\Drupal\tmgmt\JobItemInterface $job_item: The job item.
string The mapper ID to be used for the config mapper manager.
protected function getMapperId(JobItemInterface $job_item) {
// @todo: Inject dependencies.
if ($job_item
->getItemType() == static::SIMPLE_CONFIG) {
return $job_item
->getItemId();
}
else {
$mapper_id = $job_item
->getItemType();
if ($mapper_id == 'field_config') {
// Field configs are exposed as a different type for each entity type
// to the config mapper manager.
// @todo Consider doing the same for item types, would result in more
// item types.
$id_parts = explode('.', $job_item
->getItemId());
$mapper_id = $id_parts[2] . '_fields';
}
return $mapper_id;
}
}