protected function LingotekConfigMetadata::getMapperIdForName in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8 src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 8.2 src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 4.0.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.0.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.1.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.2.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.3.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.5.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.6.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.7.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
- 3.8.x src/Entity/LingotekConfigMetadata.php \Drupal\lingotek\Entity\LingotekConfigMetadata::getMapperIdForName()
Gets the mapper plugin id for a given configuration name.
Parameters
$name: Configuration name.
Return value
string|null Plugin id of the mapper.
1 call to LingotekConfigMetadata::getMapperIdForName()
- LingotekConfigMetadata::getConfigMapper in src/
Entity/ LingotekConfigMetadata.php - Gets the config mapper for this metadata.
File
- src/
Entity/ LingotekConfigMetadata.php, line 317
Class
- LingotekConfigMetadata
- Defines the Lingotek config metadata entity.
Namespace
Drupal\lingotek\EntityCode
protected function getMapperIdForName($name) {
$mapper_id = NULL;
/** @var \Drupal\config_translation\ConfigMapperInterface[] $config_mappers */
$config_mappers = \Drupal::service('plugin.manager.config_translation.mapper')
->getMappers();
foreach ($config_mappers as $config_mapper_id => $config_mapper) {
$names = $config_mapper
->getConfigNames();
if (in_array($name, $names)) {
$mapper_id = $config_mapper_id;
break;
}
}
return $mapper_id;
}