CSOpenSearchFormSubSection
extends CSOpenSearchFormSection
in package
Represents an OpenSearch Form Field of type: Input (by Default)
Tags
Table of Contents
- __construct() : mixed
- Initialize form sub section with its name
- addCheckboxField() : CSOpenSearchFormCheckboxField
- Adds a new instance of CSOpenSearchFormCheckboxField to current field set.
- addDateField() : CSOpenSearchFormDateField
- Adds a new instance of CSOpenSearchFormDateField to current field set.
- addField() : CSOpenSearchFormField
- Adds various fields to the field set.
- addFieldByType() : CSOpenSearchFormField
- Adds a new instance of CSOpenSearchFormField to current field set.
- addInputField() : CSOpenSearchFormField
- Adds a new instance of CSOpenSearchFormField to current field set.
- addSelectField() : CSOpenSearchFormSelectField
- Adds a new instance of CSOpenSearchFormSelectField to current field set.
- addSubSection() : CSOpenSearchFormSubSection
- Adds a new instance of CSOpenSearchFormSectionField to current field set.
- addTextareaField() : CSOpenSearchFormTextareaField
- Adds a new instance of CSOpenSearchFormTextareaField to current field set.
- addTextField() : CSOpenSearchFormTextField
- Adds a new instance of CSOpenSearchFormTextField to current field set.
- createCheckboxField() : CSOpenSearchFormCheckboxField
- Creates an empty form field with type: checkbox
- createData() : CSOpenSearchFormFieldData
- Creates an empty data object.
- createDateField() : CSOpenSearchFormDateField
- Creates a date form field with type: date
- createFieldByType() : CSOpenSearchFormField
- Creates a form field for a specific type CSOpenSearchConst::FORM_FIELD_TYPE_*
- createFieldData() : CSOpenSearchFormFieldData
- Creates an empty form field data object.
- createInputField() : CSOpenSearchFormField
- Creates an empty form field with type: textarea
- createSelectField() : CSOpenSearchFormSelectField
- Creates an empty form field with type: select
- createSubSection() : CSOpenSearchFormSubSection
- Creates empty section for the form
- createTextareaField() : CSOpenSearchFormTextareaField
- Creates an empty form field with type: textarea
- createTextField() : CSOpenSearchFormTextField
- Creates an empty form field with type: text
- getData() : CSOpenSearchFormFieldData|array<string|int, CSOpenSearchFormFieldData>
- Returns all defined CSOpenSearchFormFieldData objects as an array.
- getDescription() : string
- Returns the description
- getFieldByName() : CSOpenSearchFormField|null
- Returns a field by given Name.
- getFields() : array<string|int, CSOpenSearchFormField>
- Returns all defined fields.
- 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.
- removeField() : bool
- Removes given already added field form the field set.
- removeFieldByName() : bool
- Removes already added field by a Name/Id.
- removeFields() : void
- Removes all defined fields
- 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()
Initialize form sub section with its name
public
__construct(string $sName) : mixed
Parameters
- $sName : string
-
Sub Section Name
Tags
Return values
mixed —addCheckboxField()
Adds a new instance of CSOpenSearchFormCheckboxField to current field set.
public
addCheckboxField(string $sId) : CSOpenSearchFormCheckboxField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormCheckboxField —addDateField()
Adds a new instance of CSOpenSearchFormDateField to current field set.
public
addDateField(string $sId) : CSOpenSearchFormDateField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormDateField —addField()
Adds various fields to the field set.
public
addField(CSOpenSearchFormField $oField) : CSOpenSearchFormField
Parameters
- $oField : CSOpenSearchFormField
Tags
Return values
CSOpenSearchFormField —addFieldByType()
Adds a new instance of CSOpenSearchFormField to current field set.
public
addFieldByType(string $sId, string $sType) : CSOpenSearchFormField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
- $sType : string
-
One of the following constants: CSOpenSearchConst::FORM_FIELD_TYPE_*
Tags
Return values
CSOpenSearchFormField —addInputField()
Adds a new instance of CSOpenSearchFormField to current field set.
public
addInputField(string $sId) : CSOpenSearchFormField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormField —addSelectField()
Adds a new instance of CSOpenSearchFormSelectField to current field set.
public
addSelectField(string $sId) : CSOpenSearchFormSelectField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormSelectField —addSubSection()
Adds a new instance of CSOpenSearchFormSectionField to current field set.
public
addSubSection(string $sId) : CSOpenSearchFormSubSection
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormSubSection —addTextareaField()
Adds a new instance of CSOpenSearchFormTextareaField to current field set.
public
addTextareaField(string $sId) : CSOpenSearchFormTextareaField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormTextareaField —addTextField()
Adds a new instance of CSOpenSearchFormTextField to current field set.
public
addTextField(string $sId) : CSOpenSearchFormTextField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormTextField —createCheckboxField()
Creates an empty form field with type: checkbox
public
createCheckboxField(string $sId) : CSOpenSearchFormCheckboxField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormCheckboxField —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 —createDateField()
Creates a date form field with type: date
public
createDateField(string $sId) : CSOpenSearchFormDateField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormDateField —createFieldByType()
Creates a form field for a specific type CSOpenSearchConst::FORM_FIELD_TYPE_*
public
createFieldByType(string $sId, string $sType) : CSOpenSearchFormField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
- $sType : string
-
One of the following constants: CSOpenSearchConst::FORM_FIELD_TYPE_*
Tags
Return values
CSOpenSearchFormField —createFieldData()
Creates an empty form field data object.
public
createFieldData(mixed $mValue[, string $sText = null ]) : CSOpenSearchFormFieldData
It can be used to populate a field with possible data (as single object or an array)
Parameters
- $mValue : mixed
-
A mixed value for the field
- $sText : string = null
-
An optional text of the value (depends on the type)
Tags
Return values
CSOpenSearchFormFieldData —createInputField()
Creates an empty form field with type: textarea
public
createInputField(string $sId) : CSOpenSearchFormField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormField —createSelectField()
Creates an empty form field with type: select
public
createSelectField(string $sId) : CSOpenSearchFormSelectField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormSelectField —createSubSection()
Creates empty section for the form
public
createSubSection(string $sId) : CSOpenSearchFormSubSection
Parameters
- $sId : string
-
An unique name (id) of the section
Tags
Return values
CSOpenSearchFormSubSection —createTextareaField()
Creates an empty form field with type: textarea
public
createTextareaField(string $sId) : CSOpenSearchFormTextareaField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormTextareaField —createTextField()
Creates an empty form field with type: text
public
createTextField(string $sId) : CSOpenSearchFormTextField
Parameters
- $sId : string
-
An unique name (id) of a field within the form.
Tags
Return values
CSOpenSearchFormTextField —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 —getFieldByName()
Returns a field by given Name.
public
getFieldByName(string $sName) : CSOpenSearchFormField|null
Parameters
- $sName : string
-
The name of the CSOpenSearchFormField.
Tags
Return values
CSOpenSearchFormField|null —getFields()
Returns all defined fields.
public
getFields() : array<string|int, CSOpenSearchFormField>
Tags
Return values
array<string|int, CSOpenSearchFormField> —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 —removeField()
Removes given already added field form the field set.
public
removeField(CSOpenSearchFormField $oField) : bool
Parameters
- $oField : CSOpenSearchFormField
Tags
Return values
bool —Return TRUE if remove action was successfully or not.
removeFieldByName()
Removes already added field by a Name/Id.
public
removeFieldByName(string $sName) : bool
Parameters
- $sName : string
-
Name/Id of the CSOpenSearchFormField.
Tags
Return values
bool —removeFields()
Removes all defined fields
public
removeFields() : void
Tags
Return values
void —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>
