ConfigTranslationFormAccess
class ConfigTranslationFormAccess extends ConfigTranslationOverviewAccess (View source)
Checks access for displaying the translation add, edit, and delete forms.
Properties
| protected ConfigMapperManagerInterface | $configMapperManager | The mapper plugin discovery service. |
from ConfigTranslationOverviewAccess |
| protected LanguageManagerInterface | $languageManager | The language manager. |
from ConfigTranslationOverviewAccess |
Methods
Constructs a ConfigTranslationOverviewAccess object.
Checks access to the overview based on permissions and translatability.
Gets a configuration mapper using a route match.
Checks access given an account, configuration mapper, and source language.
Details
__construct(ConfigMapperManagerInterface $config_mapper_manager, LanguageManagerInterface $language_manager)
Constructs a ConfigTranslationOverviewAccess object.
AccessResultInterface
access(RouteMatchInterface $route_match, AccountInterface $account, string $langcode = NULL)
Checks access to the overview based on permissions and translatability.
protected ConfigMapperInterface
getMapperFromRouteMatch(RouteMatchInterface $route_match)
Gets a configuration mapper using a route match.
protected AccessResultInterface
doCheckAccess(AccountInterface $account, ConfigMapperInterface $mapper, LanguageInterface|null $source_language = NULL, LanguageInterface|null $target_language = NULL)
Checks access given an account, configuration mapper, and source language.
In addition to the checks performed by ConfigTranslationOverviewAccess::doCheckAccess() this makes sure the target language is not locked and the target language is not the source language.
Although technically configuration can be overlaid with translations in the same language, that is logically not a good idea.