Implements \Drupal\Core\Form\FormInterface::buildForm().
Overrides ConfirmFormBase::buildForm
public function buildForm(array $form, array &$form_state) {
$this->nodes = $this->tempStoreFactory
->get('node_multiple_delete_confirm')
->get($GLOBALS['user']->uid);
if (empty($this->nodes)) {
drupal_goto($this
->getCancelPath());
}
$form['nodes'] = array(
'#theme' => 'item_list',
'#items' => array_map(function ($node) {
return String::checkPlain($node
->label());
}, $this->nodes),
);
return parent::buildForm($form, $form_state);
}