Drupal 8 - Hello World Module
<?php
namespace Drupal\hello_world\Controller;
class HelloWorldController {
public function hello() {
return array(
'#title' => 'Hello World!',
'#markup' => 'Here is some content.',
);
}
}
hello_world:
path: /hello/world
defaults:
_controller: Drupal\hello_world\Controller\HelloWorldController::hello
requirements:
_permission: 'access content'
name: Hello World
type: module
description: Say Hello World
package: Custom
core: 8.x