class TestConfigNamesMapper in Drupal 10
Same name and namespace in other branches
- 8 core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php \Drupal\Tests\config_translation\Unit\TestConfigNamesMapper
- 9 core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php \Drupal\Tests\config_translation\Unit\TestConfigNamesMapper
Defines a test mapper class.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\config_translation\ConfigNamesMapper implements ConfigMapperInterface, ContainerFactoryPluginInterface
- class \Drupal\Tests\config_translation\Unit\TestConfigNamesMapper
- class \Drupal\config_translation\ConfigNamesMapper implements ConfigMapperInterface, ContainerFactoryPluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of TestConfigNamesMapper
File
- core/
modules/ config_translation/ tests/ src/ Unit/ ConfigNamesMapperTest.php, line 659 - Contains \Drupal\Tests\config_translation\Unit\ConfigNamesMapperTest.
Namespace
Drupal\Tests\config_translation\UnitView source
class TestConfigNamesMapper extends ConfigNamesMapper {
/**
* Gets the internal language code of this mapper, if any.
*
* This method is not to be confused with
* ConfigMapperInterface::getLangcode().
*
* @return string|null
* The language code of this mapper if it is set; NULL otherwise.
*/
public function getInternalLangcode() {
return $this->langcode ?? NULL;
}
/**
* Sets the list of configuration names.
*
* @param array $config_names
* The configuration names.
*/
public function setConfigNames(array $config_names) {
$this->pluginDefinition['names'] = $config_names;
}
/**
* Sets the configuration factory.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory to set.
*/
public function setConfigFactory(ConfigFactoryInterface $config_factory) {
$this->configFactory = $config_factory;
}
}