public function CerFieldHandler::seek in Corresponding Entity References 7.3
Implements SeekableIterator::seek().
File
- includes/
CerFieldHandler.inc, line 255 - Contains CerFieldHandler.
Class
- CerFieldHandler
- @class Handles low-level operations for a single field on a single entity. Exposes methods to add, delete and check for references. This will also iterate over the references, returning each one as an EntityDrupalWrapper object.
Code
public function seek($position) {
$length = $this
->count();
if ($position < 0) {
$position += $length;
}
if ($position >= 0 && $position < $length) {
$this->delta = $position;
}
else {
throw new OutOfBoundsException(t('Cannot seek to invalid position.'));
}
}