Contentserv PHP API

CSOpenSearchFormFieldData
in package

Represents a OpenSearch Form Data for the client to display/handle.

Tags
since

CS17.0

access

public

Table of Contents

__construct()  : mixed
CSOpenSearchFormFieldData constructor.
getLabel()  : string|null
Returns the (displayed) label.
getPattern()  : null|string
Gets the pattern of this value only.
getPatternMessage()  : string
Gets the pattern message which was set with
getValue()  : string|null
Returns the defined value.
setLabel()  : mixed
Sets a string which is used as display text.
setPattern()  : void
Sets the pattern for this value only.
setPatternMessage()  : void
Sets a pattern message
setValue()  : mixed
Sets the hidden value.
toArray()  : array<string|int, mixed>
Returns all information as an array.

Methods

__construct()

CSOpenSearchFormFieldData constructor.

public __construct([string $mValue = null ][, string $sTextLabel = null ]) : mixed
Parameters
$mValue : string = null

Used as hidden value

$sTextLabel : string = null

Used as displayed value. (depending of form field type)

Tags
Return values
mixed

getLabel()

Returns the (displayed) label.

public getLabel() : string|null
Tags
Return values
string|null

Returns null if not defined otherwise the defined value by setLabel-method or constructor.

getPattern()

Gets the pattern of this value only.

public getPattern() : null|string
Tags
Return values
null|string

Returns NULL if not set or a string if set.

getPatternMessage()

Gets the pattern message which was set with

public getPatternMessage() : string
Tags
see
setPattern
Return values
string

getValue()

Returns the defined value.

public getValue() : string|null
Tags
Return values
string|null

Returns null if not defined otherwise the defined value by setValue-method or constructor.

setLabel()

Sets a string which is used as display text.

public setLabel(string $sLabel) : mixed
Parameters
$sLabel : string
Tags
Return values
mixed

setPattern()

Sets the pattern for this value only.

public setPattern(string $sPattern[, string $sPatternMessage = '' ]) : void
Parameters
$sPattern : string

A regex expression with leading / and ending /

$sPatternMessage : string = ''

A translated pattern message which is shown if the pattern does not match.

Tags
Return values
void

setPatternMessage()

Sets a pattern message

public setPatternMessage(string $sPatternMessage) : void
Parameters
$sPatternMessage : string

A translated pattern message which is shown if the pattern does not match.

Tags
Return values
void

setValue()

Sets the hidden value.

public setValue(string $mValue) : mixed
Parameters
$mValue : string
Tags
Return values
mixed

toArray()

Returns all information as an array.

public toArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

        

Search results