class TestClassAttributeClassOnly

Same name and namespace in other branches
  1. main core/modules/system/tests/modules/router_test_directory/src/Controller/TestClassAttributeClassOnly.php \Drupal\router_test\Controller\TestClassAttributeClassOnly

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

Attributes

#[Route(path: '/test_class_attribute_class_only', name: 'router_test.class_only', requirements: [ '_access' => 'TRUE', ])]

Hierarchy

Expanded class hierarchy of TestClassAttributeClassOnly

1 file declares its use of TestClassAttributeClassOnly
AttributeRouteDiscoveryTest.php in core/tests/Drupal/Tests/Core/Routing/AttributeRouteDiscoveryTest.php

File

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

Namespace

Drupal\router_test\Controller
View source
class TestClassAttributeClassOnly extends ControllerBase {
  
  /**
   * Provides test content.
   */
  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.