ComponentsTrait
Trait for builders that use components.
Tags
Table of Contents
Properties
- $components : array<string|int, ComponentObject>
- Components of the builder.
Methods
- addComponent() : $this
- Adds a component to the builder.
- addComponents() : $this
- Adds the components to the builder.
- setComponents() : $this
- Sets the components of the builder.
Properties
$components
Components of the builder.
protected
array<string|int, ComponentObject>
$components
= []
Methods
addComponent()
Adds a component to the builder.
public
abstract addComponent(ComponentObject $component) : $this
Parameters
- $component : ComponentObject
-
Component to add.
Tags
Return values
$thisaddComponents()
Adds the components to the builder.
public
addComponents(array<string|int, ComponentObject> $components) : $this
Parameters
- $components : array<string|int, ComponentObject>
-
Components to add.
Tags
Return values
$thissetComponents()
Sets the components of the builder.
public
setComponents([array<string|int, ComponentObject>|null $components = null ]) : $this
Parameters
- $components : array<string|int, ComponentObject>|null = null
-
Components to set.