DATA_SOURCE_REQUEST
DATA_SOURCE_REQUEST
Form Control Widget
For model properties.
$adminConfig : \Charcoal\Admin\Config
Store a reference to the admin configuration.
setWidgetId(string $widgetId) : \Charcoal\Admin\AdminWidget
string | $widgetId | The widget identifier. |
Chainable
setType(string $type) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the widget or property type.
string | $type | The widget or property type. |
If the argument is not a string.
Chainable
setIdent(string $ident) : \Charcoal\Admin\AdminWidget
string | $ident | The widget ident. |
If the ident is not a string.
(Chainable)
setDataSources(mixed $sources) : \Charcoal\Admin\AdminWidget
Set extra data sources to merge when setting data on an entity.
mixed | $sources | One or more data source identifiers to merge data from. Pass NULL to reset the entity back to default sources. Pass FALSE, an empty string or array to disable extra sources. |
Chainable
dataSourceFilter(string $sourceIdent) : callable|null
Retrieve the callable filter for the given data source.
string | $sourceIdent | A data source identifier. |
If the data source is invalid.
Returns a callable variable.
setLabel(mixed $label) : \Charcoal\Admin\AdminWidget
mixed | $label | The label. |
Chainable
setShowActions(boolean $show) : \Charcoal\Admin\AdminWidget
boolean | $show | The show actions flag. |
Chainable
setShowLabel(boolean $show) : \Charcoal\Admin\Widget\FormPropertyWidget
Show/hide the property's label.
boolean | $show | Show (TRUE) or hide (FALSE) the label. |
Chainable
setPriority(integer $priority) : \Charcoal\Admin\AdminWidget
integer | $priority | The widget's sorting priority. |
Chainable
setOutputType(string $type) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the model's property type.
Can be either "input" or "display". A property input or property display identifier is also accepted.
string | $type | The input or display property type. |
If the argument is not a string.
Chainable
setFormGroup(\Charcoal\Ui\FormGroup\FormGroupInterface $formGroup) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the form input's parent group.
\Charcoal\Ui\FormGroup\FormGroupInterface | $formGroup | The parent form group object. |
Chainable
clearFormGroup() : \Charcoal\Admin\Widget\FormPropertyWidget
Clear the input's parent group.
Chainable
setData(array|\Charcoal\Admin\Widget\ArrayAccess $data) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the widget and property data.
array|\Charcoal\Admin\Widget\ArrayAccess | $data | Widget and property data. |
Chainable
merge(array|\Traversable $data) : \Charcoal\Admin\Widget\FormPropertyWidget
Merge widget and property data.
array|\Traversable | $data | Widget and property data. |
Chainable
setPropertyType(string $type) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the model's property type.
string | $type | The property type. |
If the argument is not a string.
Chainable
setPropertyIdent(string $propertyIdent) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the form's property identifier.
string | $propertyIdent | The property identifier. |
If the property ident is not a string.
Chainable
setPropertyData(array $data) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the property metadata.
array | $data | The property configset. |
Chainable
mergePropertyData(array $data) : \Charcoal\Admin\Widget\FormPropertyWidget
Merge the property metadata.
array | $data | The property configset. |
Chainable
setPropertyVal(mixed $propertyVal) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the property's value.
mixed | $propertyVal | The property value. |
Chainable
setShowDescription(boolean $show) : \Charcoal\Admin\Widget\FormPropertyWidget
Show/hide the property's description.
boolean | $show | Show (TRUE) or hide (FALSE) the description. |
Chainable
setShowNotes(boolean|string $show) : \Charcoal\Admin\Widget\FormPropertyWidget
Show/hide the property's notes.
boolean|string | $show | Show (TRUE) or hide (FALSE) the notes. |
Chainable
setInputType(string $type) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the property control type.
string | $type | The form control type. |
If the argument is not a string.
Chainable
setDisplayType(string $type) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the property display type.
string | $type | The property display type. |
If the argument is not a string.
Chainable
setProperty(\Charcoal\Property\PropertyInterface $property) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the widget's model property.
\Charcoal\Property\PropertyInterface | $property | The property. |
Chainable
setL10nMode(string $mode) : \Charcoal\Admin\Widget\FormPropertyWidget
Set the L10N display mode.
string | $mode | The L10N display mode. |
Chainable
setModelFactory(\Charcoal\Factory\FactoryInterface $factory) : \Charcoal\Admin\AdminScript
\Charcoal\Factory\FactoryInterface | $factory | The factory used to create models. |
Chainable
addDataSources(mixed $sourceIdent, mixed $sourceFilter = null) : \Charcoal\Admin\AdminWidget
Set extra data sources to merge when setting data on an entity.
mixed | $sourceIdent | The data source identifier. |
mixed | $sourceFilter | Optional filter to apply to the source's data. |
If the data source is invalid.
Chainable
mergeDataSources(array|\Charcoal\Admin\ArrayInterface $dataset = null) : \Charcoal\Admin\AdminWidget
Retrieve the available data sources (when setting data on an entity).
array|\Charcoal\Admin\ArrayInterface | $dataset | The entity data. |
Chainable
setPropertyFactory(\Charcoal\Factory\FactoryInterface $factory) : \Charcoal\Admin\Widget\FormPropertyWidget
Set a property factory.
\Charcoal\Factory\FactoryInterface | $factory | The factory to create property values. |
Chainable
setPropertyInputFactory(\Charcoal\Factory\FactoryInterface $factory) : \Charcoal\Admin\Widget\FormPropertyWidget
Set a property control factory.
\Charcoal\Factory\FactoryInterface | $factory | The factory to create form controls for property values. |
Chainable
setPropertyDisplayFactory(\Charcoal\Factory\FactoryInterface $factory) : \Charcoal\Admin\Widget\FormPropertyWidget
Set a property display factory.
\Charcoal\Factory\FactoryInterface | $factory | The factory to create displayable property values. |
Chainable
resolveOutputType(string $type) : string
Resolve the property output type.
Note: The "input_type" or "display_type" will be set if the output type is a valid output property.
string | $type | The input or display property type. |
If the property output type is invalid.
Returns either "input" or "display".