Returns an array of translatable source item types.
Overrides SourcePluginBase::getItemTypes
public function getItemTypes() {
// Only entity types are exposed as their own item type, all others are
// grouped together in simple config.
$entity_types = $this->entityTypeManager
->getDefinitions();
$definitions = $this->configMapperManager
->getDefinitions();
$types = array();
foreach ($definitions as $definition_name => $definition) {
if (isset($definition['entity_type'])) {
$types[$definition['entity_type']] = (string) $entity_types[$definition['entity_type']]
->getLabel();
}
}
$types[static::SIMPLE_CONFIG] = t('Simple configuration');
return $types;
}