iterator.chunk

Creates chunks from an input Array/Traversable with option to allocate items to a fixed number of chunks

Arguments

subject

DataType

mixed

Required

false

Description

The subject Traversable/Array instance to shift

count

DataType

integer

Required

true

Description

Number of items/chunk or if fixed then number of chunks

as

DataType

string

Required

false

Description

Template variable name to assign; if not specified the ViewHelper returns the variable instead.

fixed

DataType

boolean

Required

false

Description

If true, creates $count chunks instead of $count values per chunk

preserveKeys

DataType

boolean

Required

false

Description

If set to true, the original array keys will be preserved