StubForm.php in Drupal 9
File
core/modules/system/tests/src/Functional/Form/StubForm.php
View source
<?php
namespace Drupal\Tests\system\Functional\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
class StubForm extends FormBase {
protected $form;
protected $formId;
public function __construct($form_id, $form) {
$this->formId = $form_id;
$this->form = $form;
}
public function getFormId() {
$this->formId;
}
public function buildForm(array $form, FormStateInterface $form_state) {
return $this->form;
}
public function submitForm(array &$form, FormStateInterface $form_state) {
}
}
Classes
Name |
Description |
StubForm |
Provides a stub form for testing purposes. |