TestClassAttributeClassOnly.php
Same filename and directory in other branches
Namespace
Drupal\router_test\ControllerFile
-
core/
modules/ system/ tests/ modules/ router_test_directory/ src/ Controller/ TestClassAttributeClassOnly.php
View source
<?php
declare (strict_types=1);
namespace Drupal\router_test\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\Routing\Attribute\Route;
/**
* Test controller: class-only #[Route] with bare __invoke().
*/
class TestClassAttributeClassOnly extends ControllerBase {
/**
* Provides test content.
*/
public function __invoke() : array {
return [
'#markup' => 'Testing class-only #[Route] with bare __invoke()',
];
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| TestClassAttributeClassOnly | Test controller: class-only #[Route] with bare __invoke(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.