You are here

public function FancyFileDeleteManual::buildForm in Fancy File Delete 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/FancyFileDeleteManual.php \Drupal\fancy_file_delete\Form\FancyFileDeleteManual::buildForm()

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides ConfigFormBase::buildForm

File

src/Form/FancyFileDeleteManual.php, line 31

Class

FancyFileDeleteManual
Class FancyFileDeleteManual.

Namespace

Drupal\fancy_file_delete\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['force'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('FORCE file deletion?'),
  ];
  $form['delete_textarea'] = [
    '#type' => 'textarea',
    '#title' => $this
      ->t('FID Numbers'),
    '#default_value' => '',
    '#description' => $this
      ->t('Provide the fid numbers, one per line.'),
    '#attributes' => [
      'style' => 'font-family:"Courier New", Courier, monospace',
    ],
    '#rows' => 10,
  ];

  // $form['#validate'][] = 'fancy_file_delete_manual_validate';.
  // $form['#submit'][] = 'fancy_file_delete_manual_submit';.
  return parent::buildForm($form, $form_state);
}