class TestAttributes

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

Test controller for method-level Route attributes.

Hierarchy

Expanded class hierarchy of TestAttributes

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

File

core/modules/system/tests/modules/router_test_directory/src/Controller/TestAttributes.php, line 14

Namespace

Drupal\router_test\Controller
View source
class TestAttributes extends ControllerBase {
  public function attributeMethod() : array {
    return [
      '#markup' => 'Testing method with a Route attribute',
    ];
  }
  public function allProperties() : array {
    return [
      '#markup' => 'Testing route with all properties',
    ];
  }

}

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