Jelix 1.8.11-rc.2

HtmlBuilder extends BuilderBase
in package

Main HTML form builder.

Tags

Table of Contents

$_action  : string
the action selector.
$_actionParams  : array<string|int, mixed>
params for the action.
$_endt  : mixed
$_form  : jFormsBase
a form object.
$_name  : mixed
form name.
$defaultPluginsConf  : array<string|int, mixed>
$formConfig  : mixed
$formType  : mixed
$htmlFormAttributes  : array<string|int, mixed>
$htmlWidgetsAttributes  : array<string|int, mixed>
$jFormsJsVarName  : mixed
$options  : array<string|int, mixed>
$pluginsConf  : array<string|int, mixed>
$rootWidget  : RootWidget
$widgets  : mixed
__construct()  : mixed
HtmlBuilder constructor.
endOfTag()  : mixed
escJsStr()  : mixed
getForm()  : mixed
getjFormsJsVarName()  : string
getName()  : mixed
getOption()  : mixed
getWidget()  : WidgetInterface
outputAllControls()  : mixed
displays all the form. outputMetaContent, outputHeader and outputFooters are also called.
outputAllControlsValues()  : mixed
displays all data of the form.
outputControl()  : mixed
displays the content corresponding of the given control.
outputControlHelp()  : mixed
outputControlLabel()  : mixed
displays the label corresponding of the given control.
outputControlRawValue()  : mixed
displays the raw value of the control (without the control).
outputControlValue()  : mixed
displays the value of the control (without the control).
outputFooter()  : mixed
output the footer content of the form.
outputHeader()  : mixed
output the header content of the form.
outputMetaContent()  : mixed
called during the meta content processing in templates This method should set things on the response, like adding css styles, javascript links etc.
setAction()  : mixed
setOptions()  : mixed
set options.
_outputAttr()  : mixed
generateFormName()  : mixed
generates a name for the form.
outputErrors()  : mixed

Properties

$_action

the action selector.

protected string $_action
Tags

$_actionParams

params for the action.

protected array<string|int, mixed> $_actionParams = array()
Tags

$defaultPluginsConf

protected array<string|int, mixed> $defaultPluginsConf = array()

define default plugins for each formwidget

Tags

$formConfig

protected mixed $formConfig = 'jforms_builder_html'
Tags

$htmlFormAttributes

protected array<string|int, mixed> $htmlFormAttributes = array()

list of default html attributes to set on the form element

Tags

$htmlWidgetsAttributes

protected array<string|int, mixed> $htmlWidgetsAttributes = array()

list of attributes for each type of widgets. Keys are widgets type.

Tags

$jFormsJsVarName

protected mixed $jFormsJsVarName = 'jForms'
Tags

$options

protected array<string|int, mixed> $options = array()

options for the builder

Tags

$pluginsConf

protected array<string|int, mixed> $pluginsConf = array()

define plugins for each formwidget for the current builder

Tags

Methods

__construct()

HtmlBuilder constructor.

public __construct(jFormsBase $form) : mixed
Parameters
$form : jFormsBase
Tags
throws
Exception
Return values
mixed

endOfTag()

public endOfTag() : mixed
Tags
Return values
mixed

escJsStr()

public escJsStr(mixed $str) : mixed
Parameters
$str : mixed
Tags
Return values
mixed

getForm()

public getForm() : mixed
Tags
Return values
mixed

getjFormsJsVarName()

public getjFormsJsVarName() : string
Tags
Return values
string

getName()

public getName() : mixed
Tags
Return values
mixed

getOption()

public getOption(string $name) : mixed
Parameters
$name : string

name of an option

Tags
Return values
mixed

the value of the option

outputAllControls()

displays all the form. outputMetaContent, outputHeader and outputFooters are also called.

public outputAllControls() : mixed
Tags
Return values
mixed

outputAllControlsValues()

displays all data of the form.

public outputAllControlsValues() : mixed
Tags
Return values
mixed

outputControl()

displays the content corresponding of the given control.

public outputControl(mixed $ctrl[, mixed $attributes = array() ]) : mixed
Parameters
$ctrl : mixed

the control to display

$attributes : mixed = array()

attribute to add on the generated code (html attributes for example)

Tags
Return values
mixed

outputControlLabel()

displays the label corresponding of the given control.

public outputControlLabel(mixed $ctrl[, mixed $format = '' ][, mixed $editMode = true ]) : mixed
Parameters
$ctrl : mixed

the control to display

$format : mixed = ''
$editMode : mixed = true
Tags
Return values
mixed

outputControlRawValue()

displays the raw value of the control (without the control).

public outputControlRawValue(mixed $ctrl[, mixed $attributes = array() ]) : mixed
Parameters
$ctrl : mixed

the control to display

$attributes : mixed = array()

attribute to add on the generated code (html attributes for example)

Tags
Return values
mixed

outputControlValue()

displays the value of the control (without the control).

public outputControlValue(mixed $ctrl[, mixed $attributes = array() ]) : mixed
Parameters
$ctrl : mixed

the control to display

$attributes : mixed = array()

attribute to add on the generated code (html attributes for example)

Tags
Return values
mixed

outputFooter()

output the footer content of the form.

public outputFooter() : mixed
Tags
Return values
mixed

outputHeader()

output the header content of the form.

public outputHeader() : mixed
Tags
Return values
mixed

outputMetaContent()

called during the meta content processing in templates This method should set things on the response, like adding css styles, javascript links etc.

public outputMetaContent(mixed $t) : mixed
Parameters
$t : mixed
Tags
Return values
mixed

setAction()

public setAction(string $action, array<string|int, mixed> $actionParams) : mixed
Parameters
$action : string

action selector where form will be submit

$actionParams : array<string|int, mixed>

parameters for the action

Tags
Return values
mixed

setOptions()

set options.

public setOptions(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

some parameters

  • "errDecorator"=>"name of your javascript object for error listener"
  • "method" => "post" or "get". default is "post"
  • "plugins" => list of class names for widget. keys are controls refs
  • "attributes" => list of html attributes to put on the form element
  • "widgetsAttributes" => list of attributes for each widget. keys are controls refs
Tags
Return values
mixed

_outputAttr()

protected _outputAttr(mixed &$attributes) : mixed
Parameters
$attributes : mixed
Tags
Return values
mixed

generateFormName()

generates a name for the form.

protected static generateFormName(mixed $sel) : mixed
Parameters
$sel : mixed
Tags
Return values
mixed

outputErrors()

protected outputErrors() : mixed
Tags
Return values
mixed

Search results