3e: Add page text
Replace the empty render array with one that returns the expected text.
This commit is contained in:
parent
ef1e960f91
commit
9484d924a1
1 changed files with 7 additions and 1 deletions
|
@ -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!'),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue