public function ContentTranslationControllerOverride::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;
}