public function RulesPlugin::elements in Rules 7.2
Iterate over all elements nested below the current element.
This helper can be used to recursively iterate over all elements of a configuration. To iterate over the children only, just regularly iterate over the object.
Parameters
int $mode: (optional) The iteration mode used. See RecursiveIteratorIterator::construct(). Defaults to SELF_FIRST.
Return value
RecursiveIteratorIterator
File
- includes/
rules.core.inc, line 571 - Rules base classes and interfaces needed for any rule evaluation.
Class
- RulesPlugin
- Base class for rules plugins.
Code
public function elements($mode = RecursiveIteratorIterator::SELF_FIRST) {
return new RecursiveIteratorIterator($this, $mode);
}