class forms extends AbstractExtension

Properties

protected user $user

Methods

__construct(user $user)

Constructor.

string
getName()

Returns the name of this extension.

array
getFunctions()

Returns a list of functions to add to the existing list.

string
build_template(environment $environment, array $form_data)

Renders a form template

string
dimension(environment $environment, array $form_data)

Renders form dimension fields

string
input(environment $environment, array $form_data)

Renders a form input field

string
radio_buttons(environment $environment, array $form_data)

Renders form radio buttons

string
select(environment $environment, array $form_data)

Renders a form select field

string
textarea(environment $environment, array $form_data)

Renders a form textarea field

Details

at line 31
__construct(user $user)

Constructor.

Parameters

user $user

User object

at line 41
string getName()

Returns the name of this extension.

Return Value

string

The extension name

at line 51
array getFunctions()

Returns a list of functions to add to the existing list.

Return Value

array

Array of twig functions

at line 71
string build_template(environment $environment, array $form_data)

Renders a form template

Parameters

environment $environment
array $form_data

Return Value

string

Rendered form template

at line 93
string dimension(environment $environment, array $form_data)

Renders form dimension fields

Parameters

environment $environment

The twig environment

array $form_data

The form data

Return Value

string

Form dimension fields

at line 116
string input(environment $environment, array $form_data)

Renders a form input field

Parameters

environment $environment

The twig environment

array $form_data

The form data

Return Value

string

Form input field

at line 150
string radio_buttons(environment $environment, array $form_data)

Renders form radio buttons

Parameters

environment $environment

The twig environment

array $form_data

The form data

Return Value

string

Form radio buttons

at line 172
string select(environment $environment, array $form_data)

Renders a form select field

Parameters

environment $environment

The twig environment

array $form_data

The form data

Return Value

string

Form select field

at line 203
string textarea(environment $environment, array $form_data)

Renders a form textarea field

Parameters

environment $environment
array $form_data

Return Value

string

Form textarea field