You are here

public function FieldChain::seek in Corresponding Entity References 7.3

Implements SeekableIterator::seek().

File

field_object/includes/FieldChain.inc, line 81
Contains the FieldChain class.

Class

FieldChain
@class A doubly linked list of FieldInstance objects.

Code

public function seek($position) {
  if ($position >= 0 && $position < sizeof($this->chain)) {
    $this->index = $position;
  }
  else {
    throw new OutOfBoundsException(t('Cannot seek to invalid position %position.', array(
      '%position' => $position,
    )));
  }
}