diff -u b/core/modules/content_translation/lib/Drupal/content_translation/Controller/ContentTranslationController.php b/core/modules/content_translation/lib/Drupal/content_translation/Controller/ContentTranslationController.php --- b/core/modules/content_translation/lib/Drupal/content_translation/Controller/ContentTranslationController.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Controller/ContentTranslationController.php @@ -11,7 +11,7 @@ use Drupal\Core\Language\Language; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\ContentEntityInterface; -use \Drupal\Core\Controller\ControllerBase; +use Drupal\Core\Controller\ControllerBase; /** * Base class for entity translation controllers. @@ -20,6 +20,12 @@ /** * Translations overview page callback. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * The request obkect. + * + * @return array + * A processed build array ready to be rendered. */ public function overview(Request $request) { $entity = $request->attributes->get($request->attributes->get('_entity_type_id')); @@ -151,20 +157,18 @@ /** * Page callback for the translation addition page. * - * @param EntityInterface $entity - * The entity being translated. - * @param Language $source - * (optional) The language of the values being translated. Defaults to the - * entity language. - * @param Language $target - * (optional) The language of the translated values. Defaults to the current - * content language. + * @param \Symfony\Component\HttpFoundation\Request $request + * The request obkect. + * @param string $source + * The source language. + * @param string $target + * The target language. * * @return array * A processed form array ready to be rendered. * */ - public function add(Request $request, $source, $target) { + public function add(Request $request,$source,$target) { $entity = $request->attributes->get($request->attributes->get('_entity_type_id')); $source = language_load($source); $target = language_load($target); @@ -182,16 +186,15 @@ /** * Page callback for the translation edit page. * - * @param \Drupal\Core\Entity\EntityInterface $entity - * The entity being translated. - * @param \Drupal\Core\Language\Language $language - * (optional) The language of the translated values. Defaults to the current - * content language. + * @param \Symfony\Component\HttpFoundation\Request $request + * The request obkect. + * @param string $language + * The language for the translation edit page. * * @return array * A processed form array ready to be rendered. */ - public function edit(Request $request, $language) { + public function edit(Request $request,$language) { $entity = $request->attributes->get($request->attributes->get('_entity_type_id')); $language = language_load($language); $language = !empty($language) ? $language : $this->languageManager()->getCurrentLanguage(Language::TYPE_CONTENT); @@ -215,7 +218,7 @@ // If content language is set up to fall back to the interface language, // then there will be no switch links for Language::TYPE_CONTENT, ergo we // also need to use interface switch links. - $links = $this->languageManager()->getLanguageSwitchLinks(Language::TYPE_INTERFACE, $path); + $links = $this->languageManager()->getLanguageSwitchLinks(Language::TYPE_INTERFACE, $path); } return $links; } @@ -224,7 +227,7 @@ * Populates target values with the source values. * * @param \Drupal\Core\Entity\EntityInterface $entity - * The entitiy being translated. + * The entity being translated. * @param \Drupal\Core\Language\Language $source * The language to be used as source. * @param \Drupal\Core\Language\Language $target