TestController.php

Namespace

Drupal\contextual_test\Controller

File

core/modules/contextual/tests/modules/contextual_test/src/Controller/TestController.php

View source
<?php

declare (strict_types=1);
namespace Drupal\contextual_test\Controller;


/**
 * Test controller to provide a callback for the contextual link.
 */
class TestController {
  
  /**
   * Callback for the contextual link.
   *
   * @return array
   *   Render array.
   */
  public function render() {
    return [
      '#type' => 'markup',
      '#markup' => 'Everything is contextual!',
    ];
  }

}

Classes

Title Deprecated Summary
TestController Test controller to provide a callback for the contextual link.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.