You are here

public function SimpleNodeConfirmImportForm::buildForm in Simple Node Importer 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 ConfirmFormBase::buildForm

File

src/Form/SimpleNodeConfirmImportForm.php, line 53

Class

SimpleNodeConfirmImportForm
Defines a confirmation form to confirm deletion of something by id.

Namespace

Drupal\simple_node_importer\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, string $type = NULL, NodeInterface $node = NULL) {
  $this->node = $node;
  $form['snp_nid'] = [
    '#type' => 'hidden',
    '#value' => $node
      ->id(),
  ];
  return parent::buildForm($form, $form_state);
}