public EntityConfirmFormBase::buildForm(array $form, FormStateInterface $form_state)
Form constructor.
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
array The form structure.
Overrides EntityForm::buildForm
public function buildForm(array $form, FormStateInterface $form_state) { $form = parent::buildForm($form, $form_state); $form['#title'] = $this->getQuestion(); $form['#attributes']['class'][] = 'confirmation'; $form['description'] = array('#markup' => $this->getDescription()); $form[$this->getFormName()] = array('#type' => 'hidden', '#value' => 1); // By default, render the form using theme_confirm_form(). if (!isset($form['#theme'])) { $form['#theme'] = 'confirm_form'; } return $form; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityConfirmFormBase.php/function/EntityConfirmFormBase::buildForm/8.1.x