Contentserv PHP API

CSOpenSearchFormField
in package

Represents an OpenSearch Form Field of type: Input (by Default)

Tags
since

CS17.0

access

public

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

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.

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

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>
Tags
Return values
array<string|int, mixed>

        

Search results