Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConfigTranslationOverviewAccess.php

function 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;
}
RSS feed
Powered by Drupal