Skip to content

Bootstrap

Decorator base class


Properties

defaultFontset

Prefix for the default fontawesome fontset.

public static string $defaultFontset
  • This property is static.

Methods

__construct

Class constructor

public __construct(array $options = []): mixed

Parameters:

Parameter Type Description
$options array

Throws:


isDeep

Whether to apply the decorator to all descendants.

public isDeep(): bool

apply

Apply modifications

public apply(\Qubus\Form\FormBuilder\Element $element, bool $deep): void

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element
$deep bool

Throws:


applyToElement

Apply modifications to element

protected applyToElement(\Qubus\Form\FormBuilder\Element $element): void

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element

Throws:


applyToAddon

Render prepend or append HTML.

protected applyToAddon(string $placement, \Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents $element): void

Parameters:

Parameter Type Description
$placement string
$element \Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents

Throws:


applyToLabel

Apply modifications to label

public applyToLabel(\Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents $element): void

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents

applyToContainer

Apply modifications to container

public applyToContainer(\Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents $element): void

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents

renderContent

Render the content of the element control to HTML.

public renderContent(\Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents $element, string $html): string

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents
$html string Original rendered html

render

Render the element control to HTML.

public render(\Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents $element, string $html): string

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents
$html string Original rendered html

Throws:


renderControl

Render form control

protected renderControl(\Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents $element, \Qubus\Form\FormBuilder\Group $container): void

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element|\Qubus\Form\FormBuilder\WithComponents
$container \Qubus\Form\FormBuilder\Group

Throws:


isButton

Check if element is a button

protected static isButton(\Qubus\Form\FormBuilder\Element $element): bool
  • This method is static. Parameters:
Parameter Type Description
$element \Qubus\Form\FormBuilder\Element

register

Register Boostrap decorator and elements

public static register(): void
  • This method is static.

icon

HTML for font icons (like FontAwesome)

public static icon(string $icon, string|null $fontset = null): string
  • This method is static. Parameters:
Parameter Type Description
$icon string Icon name (and other options)
$fontset string|null Prefix for fonts

Inherited methods

isDeep

Whether to apply the decorator to all descendants.

public isDeep(): bool

apply

Apply modifications.

public apply(\Qubus\Form\FormBuilder\Element $element, bool $deep): mixed

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element
$deep bool The decorator of a parent is applied to a child.

validate

Validate the element

public validate(\Qubus\Form\FormBuilder\Element $element, bool $valid): bool

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element
$valid bool Result of FormBuilder validation.

filter

Modify the value.

public filter(\Qubus\Form\FormBuilder\Element $element, mixed $value): mixed

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element
$value mixed

render

Render to HTML

public render(\Qubus\Form\FormBuilder\Element $element, string $html): string

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element
$html string Original rendered html.

renderContent

Render the element content to HTML

public renderContent(\Qubus\Form\FormBuilder\Element $element, string $html): string

Parameters:

Parameter Type Description
$element \Qubus\Form\FormBuilder\Element
$html string Original rendered html.

applyToValidationScript

public applyToValidationScript(\Qubus\Form\FormBuilder\Control $param, array $rules): mixed

Parameters:

Parameter Type Description
$param \Qubus\Form\FormBuilder\Control
$rules array