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.
13 class FormTestFormStateValuesCleanAdvancedForm extends FormBase {
18 public function getFormId() {
19 return 'form_test_form_state_clean_values_advanced_form';
25 public function buildForm(array $form, FormStateInterface $form_state) {
26 // Build an example form containing a managed file and a submit form element.
28 '#type' => 'managed_file',
29 '#title' => t('Image'),
30 '#upload_location' => 'public://',
31 '#default_value' => 0,
35 '#value' => t('Submit'),
43 public function submitForm(array &$form, FormStateInterface $form_state) {
44 $form_state->cleanValues();