WireArray::unshift()

Unshift an element to the beginning of the WireArray (alias for prepend)

This is for consistency with PHP's naming convention of the array_unshift() method.

Usage

$wireArray->unshift($item);

Arguments

NameType(s)Description
$itemWire WireArray mixed

Item to prepend.

Return value

$this

This instance.

See Also


WireArray methods and properties

API reference based on ProcessWire core version 3.0.251