public function CclDeleteConfirm::submitForm in Custom Contextual Links 8
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- src/
Form/ CclDeleteConfirm.php, line 36 - Contains \Drupal\ccl\Form\CclDeleteConfirm.
Class
Namespace
Drupal\ccl\FormCode
public function submitForm(array &$form, \Drupal\Core\Form\FormStateInterface $form_state) {
if ($form_state
->getValue([
'confirm',
])) {
db_delete('ccl')
->condition('clid', $form_state
->getValue([
'clid',
]))
->execute();
drupal_set_message(t('Link removed.'));
_ccl_update_cache();
drupal_goto('admin/config/user-interface/ccl');
}
}