protected function FillPdfFormForm::actions in FillPDF 5.0.x
Same name and namespace in other branches
- 8.4 src/Form/FillPdfFormForm.php \Drupal\fillpdf\Form\FillPdfFormForm::actions()
@todo Remove this (imperfect) workaround once the Core issue is fixed. See https://www.drupal.org/project/fillpdf/issues/3046178.
Overrides EntityForm::actions
File
- src/
Form/ FillPdfFormForm.php, line 485
Class
- FillPdfFormForm
- Form controller for the FillPDFForm edit form.
Namespace
Drupal\fillpdf\FormCode
protected function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
// Replace inherited '?destination' query parameter with current URL.
/** @var \Drupal\Core\Url $route_info */
$route_info = $actions['delete']['#url'];
$route_info
->setOption('query', []);
$actions['delete']['#url'] = $route_info;
return $actions;
}