Add an example module
This commit is contained in:
parent
9829b0d193
commit
4d9e569882
4 changed files with 51 additions and 0 deletions
web/modules/example/src/Controller
17
web/modules/example/src/Controller/ExamplePageController.php
Normal file
17
web/modules/example/src/Controller/ExamplePageController.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\example\Controller;
|
||||
|
||||
use Drupal\Core\StringTranslation\StringTranslationTrait;
|
||||
|
||||
final class ExamplePageController {
|
||||
|
||||
use StringTranslationTrait;
|
||||
|
||||
public function __invoke(): array {
|
||||
return [
|
||||
'#markup' => $this->t('This page is powered by Drupal and Nix.'),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue