class ClassRouteCondition

Same name and namespace in other branches
  1. main core/tests/Drupal/Tests/Core/Routing/UnsupportedRouteAttributePropertiesTest.php \Drupal\Tests\Core\Routing\ClassRouteCondition

Test class.

Attributes

#[Route(condition: "context.getMethod() == 'GET'")]

Hierarchy

Expanded class hierarchy of ClassRouteCondition

File

core/tests/Drupal/Tests/Core/Routing/UnsupportedRouteAttributePropertiesTest.php, line 135

Namespace

Drupal\Tests\Core\Routing
View source
class ClassRouteCondition {
  public function attributeMethod() : array {
    return [
      '#markup' => 'Testing method with a Route attribute',
    ];
  }

}

Members

Title Sort descending Modifiers Object type Summary
ClassRouteCondition::attributeMethod public function #[Route('/test_method_attribute', 'test')]

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