From 9484d924a16e49b3e98b24cbe648bd2925dfded6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 19 Mar 2020 21:00:51 +0000 Subject: [PATCH] 3e: Add page text Replace the empty render array with one that returns the expected text. --- .../my_module/src/Controller/BlogPageController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/modules/custom/my_module/src/Controller/BlogPageController.php b/web/modules/custom/my_module/src/Controller/BlogPageController.php index 91e702c..d11eb05 100644 --- a/web/modules/custom/my_module/src/Controller/BlogPageController.php +++ b/web/modules/custom/my_module/src/Controller/BlogPageController.php @@ -2,10 +2,16 @@ namespace Drupal\my_module\Controller; +use Drupal\Core\StringTranslation\StringTranslationTrait; + class BlogPageController { + use StringTranslationTrait; + public function __invoke(): array { - return []; + return [ + '#markup' => $this->t('Welcome to my blog!'), + ]; } }