public function EntityDependencyIterator::valid in Entity Dependency API 7
Checks if current position is valid.
Return value
boolean
File
- ./
EntityDependencyIterator.inc, line 276 - Entity Dependency classes.
Class
- EntityDependencyIterator
- Iterator class which does the heavy lifting for detecting dependencies.
Code
public function valid() {
$current = current($this->entities);
if (!empty($current) && is_array($current) && isset($current['type']) && isset($current['id']) && !isset($this->traversed[$current['type']][$current['id']])) {
$this->current = $current;
return TRUE;
}
return FALSE;
}