DEFAULT_INPUT_TYPE
DEFAULT_INPUT_TYPE
Nested Widget Form Field
Allows UI widgets to be embedded into a form field and rendered using the current object, if any.
Based on \Charcoal\Admin\Widget\FormGroup\NestedWidgetFormGroup.
setData(array $data) : \Charcoal\Admin\Property\AbstractPropertyInput
This function takes an array and fill the model object with its value.
This method either calls a setter for each key (set_{$key}()
) or sets a public member.
For example, calling with setData(['properties'=>$properties])
would call
setProperties($properties)
, becasue setProperties()
exists.
But calling with setData(['foobar'=>$foo])
would set the $foobar
member
on the metadata object, because the method set_foobar()
does not exist.
array | $data | The input data. |
Chainable
setPropertyVal(mixed $val) : \Charcoal\Admin\Property\PropertyInputInterface
mixed | $val | The property value. |
Chainable
setLang(string $lang) : \Charcoal\Admin\Property\PropertyInputInterface
string | $lang | The language code / ident. |
Chainable
setPlaceholder(mixed $placeholder) : \Charcoal\Admin\Property\AbstractPropertyInput
Set the form control's placeholder.
A placeholder is a hint to the user of what can be entered in the property control.
mixed | $placeholder | The placeholder attribute. |
Chainable
setInputId(string $inputId) : \Charcoal\Admin\Property\AbstractPropertyInput
Set the input ID.
Used for the HTML "ID" attribute.
string | $inputId | HTML input id attribute. |
Chainable
setInputClass(string $inputClass) : \Charcoal\Admin\Property\AbstractPropertyInput
string | $inputClass | The input class attribute. |
If the class is not a string.
Chainable
setInputName(string $inputName) : \Charcoal\Admin\Property\AbstractPropertyInput
Set the input name.
Used for the HTML "name" attribute.
string | $inputName | HTML input id attribute. |
Chainable
setInputMode(string $inputMode) : \Charcoal\Admin\Property\AbstractPropertyInput
Set the hint to the browser for which keyboard to display.
string | $inputMode | The input type. |
If the provided argument is not a string.
Chainable
setInputType(string $inputType) : \Charcoal\Admin\Property\AbstractPropertyInput
string | $inputType | The input type. |
If the provided argument is not a string.
Chainable
hasInputAffix() : boolean
Determine if the property has an affix.
<input>
s onlyAvoid using <select>
elements here as they cannot be fully styled in WebKit browsers.
Avoid using <textarea>
elements here as their rows
attribute will
not be respected in some cases.
setType(string $type) : \Charcoal\Admin\Property\AbstractPropertyInput
Set the control type for the HTML element `<input>`.
string | $type | The control type. |
If the provided argument is not a string.
Chainable
setProperty(\Charcoal\Property\PropertyInterface $p) : \Charcoal\Admin\Property\AbstractPropertyInput
\Charcoal\Property\PropertyInterface | $p | The property. |
Chainable
setFormGroup(\Charcoal\Ui\FormGroup\FormGroupInterface $formGroup) : \Charcoal\Ui\FormInput\FormInputInterface
Set the form input's parent group.
\Charcoal\Ui\FormGroup\FormGroupInterface | $formGroup | The parent form group object. |
Chainable
renderDataRecursive(array|\Traversable $data) : array|\Traversable
Render the given data recursively.
array|\Traversable | $data | The data to render. |
If the data is not iterable.
If the form doesn't have a model.
The rendered data.