You can define any properties for components. You can assign a corresponding value to the various properties in the editor when integrating a component into a view.
The type can be defined in the AbstractComponent::addProperty($name, $type, array $options = [], $defaultValue = null, $hidden = false) method with the $type parameter. The supported types are defined by constants (AbstractComponent::PROP_TYPE_INPUT, AbstractComponent::PROP_TYPE_NUMBER, AbstractComponent::PROP_TYPE_SELECT, AbstractComponent::PROP_TYPE_BOOL).
The specified value of a property can be queried in the component using the AbstractComponent::param($name, $default = null) method.
The following types are available in edoc automate:
|
Type |
Description |
Options |
|---|---|---|
|
INPUT |
Is a simple text input field. |
- |
|
NUMBER |
Is a simple number input field. |
|
|
SELECT |
Is a selection field with predefined values. |
|
|
BOOLEAN |
Is a yes/no selection. |
- |