
| Current Path : /var/www/html/rocksensor/web/core/modules/system/tests/modules/router_test_directory/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor/web/core/modules/system/tests/modules/router_test_directory/src/Form.php |
<?php
declare(strict_types=1);
namespace Drupal\router_test;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Form to test _form routing.
*
* @internal
*/
class Form extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'router_test_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state): array {
$form['submit'] = [
'#type' => 'submit',
'#value' => 'Save',
];
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state): void {
$this->messenger()->addStatus('The router_test_form form has been submitted successfully.');
}
}