public function BusinessRuleController::enable in Business Rules 8
Same name and namespace in other branches
- 2.x src/Controller/BusinessRuleController.php \Drupal\business_rules\Controller\BusinessRuleController::enable()
Enables a BusinessRule object.
Parameters
\Drupal\business_rules\Entity\BusinessRule $business_rule: The BusinessRule object to disable.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirect response to the config_test listing page.
1 string reference to 'BusinessRuleController::enable'
File
- src/
Controller/ BusinessRuleController.php, line 38
Class
- BusinessRuleController
- Class BusinessRuleController.
Namespace
Drupal\business_rules\ControllerCode
public function enable(BusinessRule $business_rule) {
$business_rule
->enable()
->save();
return new RedirectResponse($business_rule
->url('collection', [
'absolute' => TRUE,
]));
}