function RulesReactionController::disableConfig
Disables a reaction rule.
Parameters
\Drupal\rules\Entity\ReactionRuleConfig $rules_reaction_rule: The reaction rule configuration entity.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirect response to the reaction rules listing page.
1 string reference to 'RulesReactionController::disableConfig'
File
-
src/
Controller/ RulesReactionController.php, line 44
Class
- RulesReactionController
- Controller methods for Reaction rules.
Namespace
Drupal\rules\ControllerCode
public function disableConfig(ReactionRuleConfig $rules_reaction_rule) {
$rules_reaction_rule->disable()
->save();
$this->getLogger('rules')
->notice('The reaction rule %label has been disabled.', [
'%label' => $rules_reaction_rule->label(),
]);
$this->messenger()
->addMessage($this->t('The reaction rule %label has been disabled.', [
'%label' => $rules_reaction_rule->label(),
]));
return $this->redirect('entity.rules_reaction_rule.collection');
}