<?php

namespace Drupal\straker_translate\Controller;

use Drupal\content_translation\Controller\ContentTranslationController;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\straker_translate\Form\StrakerTranslateContentTranslationForm;

/**
 * Override default translate page for Content Entities.
 */
class StrakerTranslateContentTranslationController extends ContentTranslationController {

  /**
   * {@inheritdoc}
   */
  public function overview(RouteMatchInterface $route_match, $entity_type_id = NULL) {
    $build = parent::overview($route_match, $entity_type_id);
    /* @phpstan-ignore-next-line */
    return \Drupal::formBuilder()->getForm(StrakerTranslateContentTranslationForm::class, $build);
  }

}
