You are here

public function ContentTranslationControllerOverride::overview in Translation Management Tool 8

Builds the translations overview page.

Parameters

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

string $entity_type_id: (optional) The entity type ID.

Return value

array Array of page elements to render.

Overrides ContentTranslationController::overview

File

sources/content/src/Controller/ContentTranslationControllerOverride.php, line 16

Class

ContentTranslationControllerOverride
Overridden class for entity translation controllers.

Namespace

Drupal\tmgmt_content\Controller

Code

public function overview(RouteMatchInterface $route_match, $entity_type_id = NULL) {
  $build = parent::overview($route_match, $entity_type_id);
  if (\Drupal::entityTypeManager()
    ->getAccessControlHandler('tmgmt_job')
    ->createAccess()) {
    $build = \Drupal::formBuilder()
      ->getForm('Drupal\\tmgmt_content\\Form\\ContentTranslateForm', $build);
  }
  return $build;
}