function RulesPlugin::elements
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 572
Class
- RulesPlugin
- Base class for rules plugins.
Code
public function elements($mode = RecursiveIteratorIterator::SELF_FIRST) {
return new RecursiveIteratorIterator($this, $mode);
}