CSOpenSearchFormSelectField
extends CSOpenSearchFormField
in package
Represents an OpenSearch Form Field of type: Select
Tags
Table of Contents
- __construct() : mixed
- createData() : CSOpenSearchFormFieldData
- Creates an empty data object.
- getData() : CSOpenSearchFormFieldData|array<string|int, CSOpenSearchFormFieldData>
- Returns all defined CSOpenSearchFormFieldData objects as an array.
- getDescription() : string
- Returns the description
- getLabel() : mixed
- Returns the name of the field.
- getName() : string
- Returns the ID of the field.
- getRequired() : null|bool
- Whenever the field is required
- getTitle() : string
- Returns the title
- getType() : string
- Returns the type of the field.
- setData() : void
- Sets an array of CSOpenSearchFormFieldData objects, which holds data information.
- setDescription() : void
- Sets a description.
- setLabel() : void
- Sets the name of the field.
- setName() : mixed
- Sets the ID of the field.
- setRequired() : void
- Sets the field to required
- setTitle() : void
- Sets a title.
- setType() : mixed
- Defines the type of the field. One of the CSOpenSearchConst::FORM_FIELD_TYPE_* constants.
- toArray() : array<string|int, mixed>
- Converts the object into an array
Methods
__construct()
public
__construct(mixed $sName) : mixed
Parameters
- $sName : mixed
Tags
Return values
mixed —createData()
Creates an empty data object.
public
createData([string $mValue = null ][, string $sTextLabel = null ]) : CSOpenSearchFormFieldData
Parameters
- $mValue : string = null
-
Used as hidden value
- $sTextLabel : string = null
-
Used as displayed value. (depending of form field type)
Tags
Return values
CSOpenSearchFormFieldData —getData()
Returns all defined CSOpenSearchFormFieldData objects as an array.
public
getData() : CSOpenSearchFormFieldData|array<string|int, CSOpenSearchFormFieldData>
Tags
Return values
CSOpenSearchFormFieldData|array<string|int, CSOpenSearchFormFieldData> —getDescription()
Returns the description
public
getDescription() : string
Tags
Return values
string —getLabel()
Returns the name of the field.
public
getLabel() : mixed
Tags
Return values
mixed —getName()
Returns the ID of the field.
public
getName() : string
Tags
Return values
string —getRequired()
Whenever the field is required
public
getRequired() : null|bool
Tags
Return values
null|bool —Returns null if not defined OR bool if defined.
getTitle()
Returns the title
public
getTitle() : string
Tags
Return values
string —getType()
Returns the type of the field.
public
getType() : string
Can be one of the following constants CSOpenSearchConst::FORM_FIELD_TYPE_*
Tags
Return values
string —setData()
Sets an array of CSOpenSearchFormFieldData objects, which holds data information.
public
setData(CSOpenSearchFormFieldData|array<string|int, CSOpenSearchFormFieldData> $aData) : void
Parameters
- $aData : CSOpenSearchFormFieldData|array<string|int, CSOpenSearchFormFieldData>
Tags
Return values
void —setDescription()
Sets a description.
public
setDescription(string $sDescription) : void
Parameters
- $sDescription : string
Tags
Return values
void —setLabel()
Sets the name of the field.
public
setLabel(string $sLabel) : void
Parameters
- $sLabel : string
Tags
Return values
void —setName()
Sets the ID of the field.
public
setName(string $sId) : mixed
Parameters
- $sId : string
Tags
Return values
mixed —setRequired()
Sets the field to required
public
setRequired(bool $bIsRequired) : void
Parameters
- $bIsRequired : bool
Tags
Return values
void —setTitle()
Sets a title.
public
setTitle(string $sTitle) : void
Parameters
- $sTitle : string
Tags
Return values
void —setType()
Defines the type of the field. One of the CSOpenSearchConst::FORM_FIELD_TYPE_* constants.
public
setType(string $sType) : mixed
Parameters
- $sType : string
Tags
Return values
mixed —toArray()
Converts the object into an array
public
toArray() : array<string|int, mixed>
