class MethodRouteCondition

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

Test class.

Hierarchy

Expanded class hierarchy of MethodRouteCondition

File

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

Namespace

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

}

Members

Title Sort descending Modifiers Object type Summary
MethodRouteCondition::attributeMethod public function #[Route('/test_method_attribute', 'MethodRouteCondition', condition: "context.getMethod() == 'GET'")]

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