You are here

protected function ConfigTranslationOverviewAccess::getMapperFromRouteMatch in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/config_translation/src/Access/ConfigTranslationOverviewAccess.php \Drupal\config_translation\Access\ConfigTranslationOverviewAccess::getMapperFromRouteMatch()
  2. 10 core/modules/config_translation/src/Access/ConfigTranslationOverviewAccess.php \Drupal\config_translation\Access\ConfigTranslationOverviewAccess::getMapperFromRouteMatch()

Gets a configuration mapper using a route match.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match to populate the mapper with.

Return value

\Drupal\config_translation\ConfigMapperInterface The configuration mapper.

2 calls to ConfigTranslationOverviewAccess::getMapperFromRouteMatch()
ConfigTranslationFormAccess::access in core/modules/config_translation/src/Access/ConfigTranslationFormAccess.php
Checks access to the overview based on permissions and translatability.
ConfigTranslationOverviewAccess::access in core/modules/config_translation/src/Access/ConfigTranslationOverviewAccess.php
Checks access to the overview based on permissions and translatability.

File

core/modules/config_translation/src/Access/ConfigTranslationOverviewAccess.php, line 82

Class

ConfigTranslationOverviewAccess
Checks access for displaying the configuration translation overview.

Namespace

Drupal\config_translation\Access

Code

protected function getMapperFromRouteMatch(RouteMatchInterface $route_match) {
  $mapper = $this->configMapperManager
    ->createInstance($route_match
    ->getRouteObject()
    ->getDefault('plugin_id'));
  $mapper
    ->populateFromRouteMatch($route_match);
  return $mapper;
}