ElementCollection
class ElementCollection extends BaseCollection (View source)
Class ElementCollection
Properties
protected array | $elements | Elements | from BaseCollection |
Methods
bool
validator($elements)
Valid the added element
__construct(array $elements = [])
ElementCollection constructor.
addElement($title, $description, string $image = '')
Add element
Details
in BaseCollection at line 28
array
getElements()
Get elements
in BaseCollection at line 38
add($element)
Add item to collection
in BaseCollection at line 50
array
toData()
Get all elements array data
in BaseCollection at line 65
bool
isEmpty()
Collection is empty
at line 58
bool
validator($elements)
Valid the added element
at line 24
__construct(array $elements = [])
ElementCollection constructor.