SelectItemCollection implements CollectionInterface, EditableCollectionInterface
FinalYes
Table of Contents
Interfaces
- CollectionInterface
- Marker interface for collection classes
- EditableCollectionInterface
- Interface for collection classes which es enabled to be modified
Properties
- $storage : SplDoublyLinkedList
Methods
- __construct() : mixed
- add() : void
- Adds on entry to the collection
- addAll() : void
- Adds a set of entries to the collection
- count() : int
- createFromArray() : self
- Utility method to transform an arbitrary array to a proper SelectItem collection
- current() : SelectItem
- key() : int
- next() : void
- remove() : void
- Remove the given entry from collection
- removeAll() : void
- Removes all entries from the collection
- rewind() : void
- toArray() : array<string|int, SelectItem>
- valid() : bool
Properties
$storage
protected
SplDoublyLinkedList
$storage
Methods
__construct()
public
__construct() : mixed
add()
Adds on entry to the collection
public
add(SelectItem $data) : void
Parameters
- $data : SelectItem
addAll()
Adds a set of entries to the collection
public
addAll(SelectItemCollection $other) : void
Parameters
- $other : SelectItemCollection
count()
public
count() : int
Return values
intcreateFromArray()
Utility method to transform an arbitrary array to a proper SelectItem collection
public
static createFromArray(array<string|int, mixed> $itemList, string $type) : self
Parameters
- $itemList : array<string|int, mixed>
-
List of SelectItem elements or legacy item arrays
- $type : string
-
The field type, e.g. "select"
Return values
selfcurrent()
public
current() : SelectItem
Return values
SelectItemkey()
public
key() : int
Return values
intnext()
public
next() : void
remove()
Remove the given entry from collection
public
remove(SelectItem $data) : void
Parameters
- $data : SelectItem
removeAll()
Removes all entries from the collection
public
removeAll() : void
collection will be empty afterwards
rewind()
public
rewind() : void
toArray()
public
toArray() : array<string|int, SelectItem>
Return values
array<string|int, SelectItem>valid()
public
valid() : bool