public function SimpleUserConfirmImportForm::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/ SimpleUserConfirmImportForm.php, line 53
Class
- SimpleUserConfirmImportForm
- Defines a confirmation form to confirm deletion of something by id.
Namespace
Drupal\simple_node_importer\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $option = NULL, NodeInterface $node = NULL) {
$this->node = $node;
$form['snp_nid'] = [
'#type' => 'hidden',
'#value' => $node
->id(),
];
$parameters = [
'option' => $option,
'node' => $node
->id(),
];
return parent::buildForm($form, $form_state, $parameters);
}