function RulesReactionController::enableConfig
Enables 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::enableConfig'
File
-
src/
Controller/ RulesReactionController.php, line 22
Class
- RulesReactionController
- Controller methods for Reaction rules.
Namespace
Drupal\rules\ControllerCode
public function enableConfig(ReactionRuleConfig $rules_reaction_rule) {
$rules_reaction_rule->enable()
->save();
$this->getLogger('rules')
->notice('The reaction rule %label has been enabled.', [
'%label' => $rules_reaction_rule->label(),
]);
$this->messenger()
->addMessage($this->t('The reaction rule %label has been enabled.', [
'%label' => $rules_reaction_rule->label(),
]));
return $this->redirect('entity.rules_reaction_rule.collection');
}