TestRouteAttributeForm.php
Same filename and directory in other branches
Namespace
Drupal\router_test\FormFile
-
core/
modules/ system/ tests/ modules/ router_test_directory/ src/ Form/ TestRouteAttributeForm.php
View source
<?php
declare (strict_types=1);
namespace Drupal\router_test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\Routing\Attribute\Route;
/**
* Test form object for Route attribute.
*/
class TestRouteAttributeForm extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId() : string {
return 'router_test';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) : array {
$form['button'] = [
'#type' => 'submit',
'#value' => 'Click here',
];
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) : void {
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| TestRouteAttributeForm | Test form object for Route attribute. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.