Contentserv PHP API

CSGuiEditorType
in package

The CSGuiEditorTypes provides an interface to define new types for the CSGuiEditor {@link:CSGuiEditor}

The most important field is the field type. It may contain:

  • a string describing the buildin editor types , e.g. text
  • an array containing a mix of strings and CSGuiEditorType objects: o a string defined html code, where {InputID} is replaced by the correct inputFieldID in the editor o a CSGuiEditorType to define multiple subelements As in the CSGuiEditor an array as type defines a selection list this can not be done with the CSGuiEditorType, because an array represents a mixed structure. Therefore the field $options can be used to define selections as arrays.

The field $pattern can define regular expressions which should be matched either as string or as array of expressions which all must be fullfilled. These pattern must have the javascript pattern format, e.g.: /^[-]?\d+(.,+)?$/ for numbers or /^[0-9a-f]*$/i for hexcharacters

The field $tooltip defines the tooltip and the message in the Editor if the pattern is not fullfilled

The field $interval defines a numerical interval where the input must be within. The interval is defined in the form [FROM]-[TO] where eigher the [FROM] or [TO] part may not be defined, e.g.: -10 - 20 for a number between -10 and 20 0- for a number larger than 0 -10- for a number larger than -10 -100 for a number lower than 100

The field $keySuffix defines a suffix which should be added the the field, e.g.: the _[SUBTYPE]. It is automatically set using the CSGuiMixedEditorType

The field $dialog can be used in future versions to open a dialog which should be used to set the content. This feature has not yet been implemented

The field $buttons can be used in future versions to defines further buttons which should be shown in the vertical toolbar of the Editor. This feature has not yet been implemented

The field $controls can be used in future versions to defines further buttons which should be shown in the vertical toolbar of the Editor. This feature has not yet been implemented

Tags
since
4.2.1

Table of Contents

$additionalOptions  : mixed
$buttons  : mixed
$controls  : mixed
$dialog  : mixed
$fixedField  : mixed
$interval  : mixed
$keySuffix  : mixed
$options  : mixed
$pattern  : mixed
$tooltip  : mixed
$type  : mixed
$useIDLists  : mixed
__construct()  : mixed
addControls()  : mixed
createInputField()  : mixed
getInputID()  : mixed
getKeys()  : mixed
getRealKey()  : mixed
getValue()  : mixed
setFixedField()  : mixed
setRequired()  : mixed
setSubType()  : mixed

Properties

Methods

__construct()

public __construct([mixed $type = "text" ][, mixed $options = array() ][, mixed $pattern = '' ][, mixed $tooltip = '' ][, mixed $interval = '' ][, mixed $keySuffix = '' ][, mixed $controls = array() ][, mixed $dialog = array() ][, mixed $buttons = array() ]) : mixed
Parameters
$type : mixed = "text"
$options : mixed = array()
$pattern : mixed = ''
$tooltip : mixed = ''
$interval : mixed = ''
$keySuffix : mixed = ''
$controls : mixed = array()
$dialog : mixed = array()
$buttons : mixed = array()
Tags
Return values
mixed

addControls()

public addControls(mixed $csGuiEditor[, mixed $addSrc = "" ]) : mixed
Parameters
$csGuiEditor : mixed
$addSrc : mixed = ""
Tags
Return values
mixed

createInputField()

public createInputField(mixed $csGuiEditor, mixed $record, mixed $fieldName, mixed $key, mixed $isDisabled, mixed $additionalStyle, mixed $additionalOptions) : mixed
Parameters
$csGuiEditor : mixed
$record : mixed
$fieldName : mixed
$key : mixed
$isDisabled : mixed
$additionalStyle : mixed
$additionalOptions : mixed
Tags
Return values
mixed

getInputID()

public getInputID(mixed $csGuiEditor, mixed $key) : mixed
Parameters
$csGuiEditor : mixed
$key : mixed
Tags
Return values
mixed

getKeys()

public getKeys(mixed $key) : mixed
Parameters
$key : mixed
Tags
Return values
mixed

getRealKey()

public getRealKey(mixed $key) : mixed
Parameters
$key : mixed
Tags
Return values
mixed

getValue()

public getValue(Record $record, mixed $key) : mixed
Parameters
$record : Record
$key : mixed
Tags
Return values
mixed

setFixedField()

public setFixedField(mixed $field) : mixed
Parameters
$field : mixed
Tags
Return values
mixed

setRequired()

public setRequired([mixed $text = '' ]) : mixed
Parameters
$text : mixed = ''
Tags
Return values
mixed

setSubType()

public setSubType(mixed $subType) : mixed
Parameters
$subType : mixed
Tags
Return values
mixed

        

Search results