class EnabledArrayIterator in RESTful 7.2
Hierarchy
- class \Drupal\restful\Resource\EnabledArrayIterator extends \Drupal\restful\Resource\FilterIterator
Expanded class hierarchy of EnabledArrayIterator
File
- src/
Resource/ EnabledArrayIterator.php, line 10 - Contains \Drupal\restful\Resource\EnabledArrayIterator.
Namespace
Drupal\restful\ResourceView source
class EnabledArrayIterator extends \FilterIterator {
/**
* Check whether the current element of the iterator is acceptable.
*
* @return bool
* TRUE if the current element is acceptable, otherwise FALSE.
*
* @link http://php.net/manual/en/filteriterator.accept.php
*/
public function accept() {
if (!($resource = $this
->current())) {
return FALSE;
}
return $resource
->isEnabled();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EnabledArrayIterator:: |
public | function | Check whether the current element of the iterator is acceptable. |