function MethodRouteCondition::attributeMethod
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Routing/UnsupportedRouteAttributePropertiesTest.php \Drupal\Tests\Core\Routing\MethodRouteCondition::attributeMethod()
Attributes
#[Route('/test_method_attribute', 'MethodRouteCondition', condition: "context.getMethod() == 'GET'")]
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ UnsupportedRouteAttributePropertiesTest.php, line 99
Class
- MethodRouteCondition
- Test class.
Namespace
Drupal\Tests\Core\RoutingCode
public function attributeMethod() : array {
return [
'#markup' => 'Testing method with a Route attribute',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.