TestTitleClosureAttributesPhp85.php
Namespace
Drupal\router_test\ControllerFile
-
core/
modules/ system/ tests/ modules/ router_test_directory/ src/ TestTitleClosureAttributesPhp85.php
View source
<?php
declare (strict_types=1);
namespace Drupal\router_test\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Routing\Attribute\Route;
use Drupal\Core\StringTranslation\TranslatableMarkup;
/**
* Test controller for PHP 8.5 title closures in Route attributes.
*/
class TestTitleClosureAttributesPhp85 extends ControllerBase {
/**
* Two routes on one method, each with its own title closure.
*/
public function titleClosure(string $parameter) : array {
return [
'#markup' => 'Testing method with title closures',
];
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| TestTitleClosureAttributesPhp85 | Test controller for PHP 8.5 title closures in Route attributes. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.