class TitleClosureCallback
Provides an example title closure for TitleResolverTest.
This file intentionally contains a closure in an attribute argument, which is valid only in PHP 8.5 and later. It is loaded only by the PHP-gated test.
Hierarchy
- class \Drupal\Tests\Core\Controller\TitleClosureCallback
Expanded class hierarchy of TitleClosureCallback
File
-
core/
tests/ Drupal/ Tests/ Core/ Controller/ TitleClosureCallback.php, line 16
Namespace
Drupal\Tests\Core\ControllerView source
class TitleClosureCallback {
/**
* A controller with a title closure on its route attribute.
*
* @return array
* A render array.
*/
public function example(string $value) : array {
return [];
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| TitleClosureCallback::example | public | function | A controller with a title closure on its route attribute. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.