Skip to content

Components

Element that exists of several components.


  • Full name: \Qubus\Form\FormBuilder\Components

Properties

components

Components

protected \Qubus\Form\FormBuilder\Element[] $components

Methods

initComponents

Initialise default components.

protected initComponents(): void

Throws:


newComponent

Create / init new component.

public newComponent(string|null $name = null, string|null $type = null, array $options = [], array $attr = []): \Qubus\Form\FormBuilder\Element

Parameters:

Parameter Type Description
$name string|null Component name
$type string|null Element type
$options array Element options
$attr array Element attr

Throws:


getComponent

Get a component.

public getComponent(string $name): \Qubus\Form\FormBuilder\Element|null

Parameters:

Parameter Type Description
$name string

Throws:


getLabel

Get label component.

public getLabel(): \Qubus\Form\FormBuilder\Element

Throws:


getContainer

Get the container component.

public getContainer(): \Qubus\Form\FormBuilder\Group

Throws:


render

Render the element to HTML.

public render(): string

Throws:


renderElement

Render to base HTML element.

public renderElement(): string
  • This method is abstract.