function TestClassAttribute::overrides

Same name and namespace in other branches
  1. main core/modules/system/tests/modules/router_test_directory/src/Controller/TestClassAttribute.php \Drupal\router_test\Controller\TestClassAttribute::overrides()

Attributes

#[Route(path: '/overrides/{id}', name: 'overrides', requirements: [ 'id' => '\\d+', ], options: [ 'option_a' => 'from_method', 'option_b' => 'from_method', ], defaults: [ 'default_a' => 'from_method', 'default_b' => 'from_method', ], host: 'method.example.com', methods: [ 'POST', ], schemes: [ 'https', ], priority: 10)]

File

core/modules/system/tests/modules/router_test_directory/src/Controller/TestClassAttribute.php, line 38

Class

TestClassAttribute
Test controller for class-level Route attribute with method-level merging.

Namespace

Drupal\router_test\Controller

Code

public function overrides() : array {
  return [
    '#markup' => 'Overrides class globals',
  ];
}

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