You are here

public function ConfigTranslationControllerOverride::itemPage in Translation Management Tool 8

Language translations overview page for a configuration name.

Parameters

\Symfony\Component\HttpFoundation\Request $request: Page request object.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

string $plugin_id: The plugin ID of the mapper.

Return value

array Page render array.

Overrides ConfigTranslationController::itemPage

File

sources/tmgmt_config/src/Controller/ConfigTranslationControllerOverride.php, line 17

Class

ConfigTranslationControllerOverride
Overridden class for entity translation controllers.

Namespace

Drupal\tmgmt_config\Controller

Code

public function itemPage(Request $request, RouteMatchInterface $route_match, $plugin_id) {
  $build = parent::itemPage($request, $route_match, $plugin_id);
  if (\Drupal::entityTypeManager()
    ->getAccessControlHandler('tmgmt_job')
    ->createAccess()) {
    $build = \Drupal::formBuilder()
      ->getForm('Drupal\\tmgmt_config\\Form\\ConfigTranslateForm', $build, $plugin_id);
  }
  return $build;
}