public function SubmitButtonRules::configurationFormSubmitRemoveRule in Flexiform 8
Form submit for removing a rule.
File
- contrib/
rules/ src/ Plugin/ FormEnhancer/ SubmitButtonRules.php, line 221
Class
- SubmitButtonRules
- A flexiform enhancer to trigger rules on submission.
Namespace
Drupal\flexiform_rules\Plugin\FormEnhancerCode
public function configurationFormSubmitRemoveRule($form, FormStateInterface $form_state) {
$button = $form_state
->getTriggeringElement();
unset($this->configuration[$button['#submit_path']]['rules'][$button['#rule_name']]);
$form_state
->setRebuild();
}