public function Rule::addComponent in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Entity/Rule.php \Drupal\rng\Entity\Rule::addComponent()
- 3.x src/Entity/Rule.php \Drupal\rng\Entity\Rule::addComponent()
Add components to the rule.
Components are not saved until the rule is saved.
Parameters
\Drupal\rng\RuleComponentInterface $component: The rule component entity.
Return value
\Drupal\rng\RuleInterface Return this object for chaining.
Overrides RuleInterface::addComponent
File
- src/
Entity/ Rule.php, line 112
Class
- Rule
- Defines the event rule entity.
Namespace
Drupal\rng\EntityCode
public function addComponent(RuleComponentInterface $component) {
$this->components_unsaved[] = $component;
return $this;
}