/** {@inheritDoc} */ public function slice($offset, $length = null) { $this->initialize(); return $this->collection->slice($offset, $length); }
function slice($offset, $length = null) { return $this->fields->slice($offset, $length); }
/** * Extracts a slice of $length elements starting at position $offset from the Collection. * * If $length is null it returns all elements from $offset to the end of the Collection. * Keys have to be preserved by this method. Calling this method will only return the * selected slice and NOT change the elements contained in the collection slice is called on. * * @param int $offset The offset to start from. * @param int|null $length The maximum number of elements to return, or null for no limit. * * @return array */ public function slice($offset, $length = null) { return $this->collection->slice($offset, $length); }
/** * Returns an collection of items for a page. * * @param int $offset Page offset * @param int $itemCountPerPage Number of items per page * @return array */ public function getItems($offset, $itemCountPerPage) { return $this->collection->slice($offset, $itemCountPerPage); }