public function ProductFeatureDeleteForm::submitForm in Ubercart 8.4
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
- uc_product/
src/ Form/ ProductFeatureDeleteForm.php, line 85
Class
- ProductFeatureDeleteForm
- Defines the attribute option delete form.
Namespace
Drupal\uc_product\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
uc_product_feature_delete($this->feature['pfid']);
$this
->messenger()
->addMessage($this
->t('The product feature has been deleted.'));
$form_state
->setRedirect('uc_product.features', [
'node' => $this->node
->id(),
]);
}