You are here

class BlockExampleController in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 block_example/src/Controller/BlockExampleController.php \Drupal\block_example\Controller\BlockExampleController

Controller routines for block example routes.

Hierarchy

Expanded class hierarchy of BlockExampleController

File

modules/block_example/src/Controller/BlockExampleController.php, line 10

Namespace

Drupal\block_example\Controller
View source
class BlockExampleController {
  use DescriptionTemplateTrait;

  /**
   * {@inheritdoc}
   */
  protected function getModuleName() {
    return 'block_example';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BlockExampleController::getModuleName protected function Name of our module. Overrides DescriptionTemplateTrait::getModuleName
DescriptionTemplateTrait::description public function Generate a render array with our templated content.
DescriptionTemplateTrait::getDescriptionTemplatePath protected function Get full path to the template.
DescriptionTemplateTrait::getDescriptionVariables protected function Variables to act as context to the twig template file. 1