public function CustomFilter::addRule in Custom filter 8
Same name and namespace in other branches
- 2.0.x src/Entity/CustomFilter.php \Drupal\customfilter\Entity\CustomFilter::addRule()
Add a new rule.
@todo trown an exception when the rule exist.
Parameters
array $rule: An array with a rule.
File
- src/
Entity/ CustomFilter.php, line 116
Class
- CustomFilter
- Defines the entify for a filter in customfilter.
Namespace
Drupal\customfilter\EntityCode
public function addRule(array $rule) {
$this->rules[$rule['rid']] = $rule;
}