BootstrapRenderer
class BootstrapRenderer implements IFormRenderer
Converts a Form into Bootstrap 4 HTML output.
Traits
Constants
defaultLabelColumns |
|
defaultControlColumns |
|
Properties
string | $gridBreakPoint | Bootstrap grid breakpoint for side-by-side view. Default is 'sm'. NULL means not to use a breakpoint | |
protected BootstrapForm | $form | ||
protected int | $labelColumns | ||
protected int | $controlColumns | ||
int | $mode | ||
bool | $groupHidden | if true, hidden fields will be grouped at the end. If false, hidden fields are placed where they were added. Default is true. |
Methods
BootstrapRenderer constructor.
Sets the form for which to render. Used only if a specific function of the renderer must be executed outside of render(), such as during assisted manual rendering.
Turns configuration or and existing element and configures it appropriately
No description
No description
No description
No description
Returns render mode
No description
No description
Provides complete form rendering.
Renders form begin.
Renders form body.
Renders 'control' part of visual row of controls.
Renders group of controls.
Renders form end.
Renders 'label' part of visual row of controls.
Renders single visual row.
Set how many of Bootstrap rows shall the label and control occupy
Sets render mode
Fetch config tailored for current render mode
Get element based on its first-level key
Renders control description (help text)
Renders valid or invalid feedback of form or control
Details
at line 68
__construct(int $mode = RenderMode::VerticalMode)
BootstrapRenderer constructor.
at line 78
attachForm(
Form
$form)
Sets the form for which to render. Used only if a specific function of the renderer must be executed outside of render(), such as during assisted manual rendering.
at line 89
Html
|null
configElem($config, $el = NULL)
Turns configuration or and existing element and configures it appropriately
at line 165
getConfig()
at line 229
getConfigOverride()
at line 268
string
getGridBreakPoint()
at line 277
BootstrapRenderer
setGridBreakPoint(string $gridBreakPoint)
at line 289
int
getMode()
Returns render mode
at line 298
bool
isGroupHidden()
at line 308
BootstrapRenderer
setGroupHidden(bool $groupHidden)
at line 321
string
render(
Form
$form, null $mode = NULL)
Provides complete form rendering.
at line 338
string
renderBegin()
Renders form begin.
at line 372
string
renderBody()
Renders form body.
at line 441
string
renderControl(
IControl
$control)
Renders 'control' part of visual row of controls.
at line 461
string
renderControls(
Container
|
ControlGroup
$parent)
Renders group of controls.
at line 503
string
renderEnd()
Renders form end.
at line 513
Html
renderLabel(
IControl
$control)
Renders 'label' part of visual row of controls.
at line 541
string
renderPair(
IControl
$control)
Renders single visual row.
at line 583
setColumns(int $label, int|null $control = NULL)
Set how many of Bootstrap rows shall the label and control occupy
at line 598
setMode(int $renderMode)
Sets render mode
at line 608
protected array
fetchConfig(string $key)
Fetch config tailored for current render mode
at line 626
protected
Html
|null
getElem($key, array ...$additionalKeys)
Get element based on its first-level key
at line 643
protected
Html
|null
renderDescription(
IControl
$control)
Renders control description (help text)
at line 670
protected
Html
|null
renderFeedback(
BaseControl
|null $control = NULL)
Renders valid or invalid feedback of form or control