function TestClassAttributeClassOnly::__invoke

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/router_test_directory/src/Controller/TestClassAttributeClassOnly.php \Drupal\router_test\Controller\TestClassAttributeClassOnly::__invoke()

Provides test content.

File

core/modules/system/tests/modules/router_test_directory/src/Controller/TestClassAttributeClassOnly.php, line 23

Class

TestClassAttributeClassOnly
Test controller: class-only #[Route] with bare __invoke().

Namespace

Drupal\router_test\Controller

Code

public function __invoke() : array {
  return [
    '#markup' => 'Testing class-only #[Route] with bare __invoke()',
  ];
}

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