3 namespace Drupal\form_test\Form;
5 use Drupal\Core\Form\FormBase;
6 use Drupal\Core\Form\FormStateInterface;
9 * Form builder for \Drupal\Core\Form\FormState::cleanValues() test.
11 class FormTestFormStateValuesCleanAdvancedForm extends FormBase {
16 public function getFormId() {
17 return 'form_test_form_state_clean_values_advanced_form';
23 public function buildForm(array $form, FormStateInterface $form_state) {
24 // Build an example form containing a managed file and a submit form element.
26 '#type' => 'managed_file',
27 '#title' => t('Image'),
28 '#upload_location' => 'public://',
29 '#default_value' => 0,
33 '#value' => t('Submit'),
41 public function submitForm(array &$form, FormStateInterface $form_state) {
42 $form_state->cleanValues();