Form submission handler.
array $form: An associative array containing the structure of the form.
array $form_state: An associative array containing the current state of the form.
Overrides FormInterface::submitForm
public function submitForm(array &$form, array &$form_state) {
if ($form_state['values']['confirm'] && !empty($this->nodes)) {
$this->storageController
->delete($this->nodes);
$this->tempStoreFactory
->get('node_multiple_delete_confirm')
->delete($GLOBALS['user']->uid);
$count = count($this->nodes);
watchdog('content', 'Deleted @count posts.', array(
'@count' => $count,
));
drupal_set_message(format_plural($count, 'Deleted 1 post.', 'Deleted @count posts.'));
}
$form_state['redirect'] = 'admin/content';
}