class FileRequiredTestForm
Same name in other branches
- 10 core/modules/file/tests/file_test/src/Form/FileRequiredTestForm.php \Drupal\file_test\Form\FileRequiredTestForm
- 11.x core/modules/file/tests/file_test/src/Form/FileRequiredTestForm.php \Drupal\file_test\Form\FileRequiredTestForm
File required test form class.
Hierarchy
- class \Drupal\file_test\Form\FileTestForm implements \Drupal\Core\Form\FormInterface
- class \Drupal\file_test\Form\FileRequiredTestForm extends \Drupal\file_test\Form\FileTestForm
Expanded class hierarchy of FileRequiredTestForm
1 string reference to 'FileRequiredTestForm'
- file_test.routing.yml in core/
modules/ file/ tests/ file_test/ file_test.routing.yml - core/modules/file/tests/file_test/file_test.routing.yml
File
-
core/
modules/ file/ tests/ file_test/ src/ Form/ FileRequiredTestForm.php, line 10
Namespace
Drupal\file_test\FormView source
class FileRequiredTestForm extends FileTestForm {
/**
* {@inheritdoc}
*/
public function getFormId() {
return '_file_required_test_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$form['file_test_upload']['#required'] = TRUE;
return $form;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
FileRequiredTestForm::buildForm | public | function | Form constructor. | Overrides FileTestForm::buildForm |
FileRequiredTestForm::getFormId | public | function | Returns a unique string identifying the form. | Overrides FileTestForm::getFormId |
FileTestForm::submitForm | public | function | Form submission handler. | Overrides FormInterface::submitForm |
FileTestForm::validateForm | public | function | Form validation handler. | Overrides FormInterface::validateForm |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.