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

count()

public count() : int
Return values
int

createFromArray()

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
self

removeAll()

Removes all entries from the collection

public removeAll() : void

collection will be empty afterwards

valid()

public valid() : bool
Return values
bool

        
On this page

Search results