You are here

public function MultipleNidsExportForm::buildForm in Node export 8

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 FormInterface::buildForm

File

src/Form/MultipleNidsExportForm.php, line 23

Class

MultipleNidsExportForm
Provides a Multiple Node Export form using Nids.

Namespace

Drupal\node_Export\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = [];
  $form['nids'] = [
    '#type' => 'textarea',
    '#title' => 'Node Ids',
    '#cols' => 10,
    '#rows' => 10,
    '#description' => $this
      ->t('Enter the line separated node ids'),
    '#required' => TRUE,
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Export'),
  ];
  return $form;
}