diff --git a/config_entity_example/lib/Drupal/config_entity_example/Controller/RobotListController.php b/config_entity_example/lib/Drupal/config_entity_example/Controller/RobotListController.php index 7df7d8a..3bcbe8f 100644 --- a/config_entity_example/lib/Drupal/config_entity_example/Controller/RobotListController.php +++ b/config_entity_example/lib/Drupal/config_entity_example/Controller/RobotListController.php @@ -49,4 +49,26 @@ class RobotListController extends ConfigEntityListController { return $row + parent::buildRow($entity); } + /** + * Add some descriptive text to our entity list. + * + * @return array + * Renderable array. + */ + public function render() { + $build['description'] = array( + '#markup' => $this->t("

The Config Entity Example module defines a" + . " Robot entity type. This is a list of the Robot entities currently" + . " in your Drupal site.

By default, when you enable this module," + . " one entity is created from configuration. This is why we call them" + . " Config Entities. Marvin, the paranoid android, is created in the" + . " database when the module is enabled.

You can view a list of" + . " Robots here. You can also use the 'Operations' column to edit and" + . " delete Robots. You can also click on the Robots' names to view" + . " them.

"), + ); + $build[] = parent::render(); + return $build; + } + }