public function RuleComponent::setRule in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Entity/RuleComponent.php \Drupal\rng\Entity\RuleComponent::setRule()
- 3.x src/Entity/RuleComponent.php \Drupal\rng\Entity\RuleComponent::setRule()
Sets the rule for the component.
Return value
\Drupal\rng\RuleComponentInterface Return this object for chaining.
Overrides RuleComponentInterface::setRule
File
- src/
Entity/ RuleComponent.php, line 48
Class
- RuleComponent
- Defines a event rule plugin instance entity: a condition or action.
Namespace
Drupal\rng\EntityCode
public function setRule(RuleInterface $rule) {
$this
->set('rule', [
'entity' => $rule,
]);
return $this;
}