diff --git a/core/modules/locale/src/Form/TranslationStatusForm.php b/core/modules/locale/src/Form/TranslationStatusForm.php index c8338cd..cf331ed 100644 --- a/core/modules/locale/src/Form/TranslationStatusForm.php +++ b/core/modules/locale/src/Form/TranslationStatusForm.php @@ -11,6 +11,7 @@ use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Render\RendererInterface; use Drupal\Core\State\StateInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -34,12 +35,20 @@ class TranslationStatusForm extends FormBase { protected $state; /** + * The rendering service. + * + * @var \Drupal\Core\Render\RendererInterface + */ + protected $renderer; + + /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('module_handler'), - $container->get('state') + $container->get('state'), + $container->get('renderer') ); } @@ -50,10 +59,13 @@ public static function create(ContainerInterface $container) { * A module handler. * @param \Drupal\Core\State\StateInterface $state * The state service. + * @param \Drupal\Core\Render\RendererInterface $renderer + * The rendering service. */ - public function __construct(ModuleHandlerInterface $module_handler, StateInterface $state) { + public function __construct(ModuleHandlerInterface $module_handler, StateInterface $state, RendererInterface $renderer) { $this->moduleHandler = $module_handler; $this->state = $state; + $this->renderer = $renderer; } /** @@ -99,7 +111,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ), 'status' => array( 'class' => array('description', 'priority-low'), - 'data' => drupal_render($locale_translation_update_info), + 'data' => $this->renderer->render($locale_translation_update_info), ), ); if (!empty($update['not_found'])) {