SelectItemCollection

final class \TYPO3\CMS\Core\Schema\Struct\SelectItemCollection

Implements
CollectionInterface, EditableCollectionInterface

Table of Contents

Interfaces

CollectionInterface
Marker interface for collection classes
EditableCollectionInterface
Interface for collection classes which es enabled to be modified

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()  : SelectItem[]
valid()  : bool

Methods

add()

Adds on entry to the collection

public add(mixed $data) : void

Parameters

$data : mixed

Tags

todo

replace this with a strict "SelectItem" type in TYPO3 v15.0

count()

public count() : int

Return values

int

createFromArray()

Utility method to transform an arbitrary array to a proper SelectItem collection

public static createFromArray(array $itemList, string $type) : self

Parameters

$itemList : array

List of SelectItem elements or legacy item arrays

$type : string

The field type, e.g. "select"

Return values

self

remove()

Remove the given entry from collection

public remove(mixed $data) : void

Parameters

$data : mixed

Tags

todo

replace this with a strict "SelectItem" type in TYPO3 v15.0

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