\App\Base\TraitsFormPageTrait

Form Page Trait

Summary

Methods
Properties
Constants
getForm()
getFormDefinition()
formValidate()
formSubmitted()
No public properties found
No constants found
getFormId()
isSubmitted()
addSubmitButton()
fillConfirmationForm()
beforeRender()
$template_data
N/A
No private methods found
No private properties found
N/A

Properties

$template_data

$template_data : array

Type

array — template data

Methods

getForm()

getForm() : \Degami\PHPFormsApi\Form

get form object

Returns

\Degami\PHPFormsApi\Form —

getFormDefinition()

getFormDefinition(\Degami\PHPFormsApi\Form  $form, array  $form_state) : \Degami\PHPFormsApi\Form

gets form definition object

Parameters

\Degami\PHPFormsApi\Form $form
array $form_state

Returns

\Degami\PHPFormsApi\Form —

formValidate()

formValidate(\Degami\PHPFormsApi\Form  $form, array  $form_state) : bool|string

validates form submission

Parameters

\Degami\PHPFormsApi\Form $form
array $form_state

Returns

bool|string —

formSubmitted()

formSubmitted(\Degami\PHPFormsApi\Form  $form, array  $form_state) : mixed|\Symfony\Component\HttpFoundation\Response

handles form submission

Parameters

\Degami\PHPFormsApi\Form $form
array $form_state

Returns

mixed|\Symfony\Component\HttpFoundation\Response —

getFormId()

getFormId() : string

gets form id

Returns

string —

isSubmitted()

isSubmitted() : bool

check if form is submitted

Returns

bool —

addSubmitButton()

addSubmitButton(\Degami\PHPFormsApi\Form  $form, bool  $inline_button = false) : \Degami\PHPFormsApi\Form

adds submit button to form

Parameters

\Degami\PHPFormsApi\Form $form
bool $inline_button

Returns

\Degami\PHPFormsApi\Form —

fillConfirmationForm()

fillConfirmationForm(string  $confirm_message, \Degami\PHPFormsApi\Form  $form, string|null  $cancel_url = null) : \Degami\PHPFormsApi\Form

gets a form for confirmation

Parameters

string $confirm_message
\Degami\PHPFormsApi\Form $form
string|null $cancel_url

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException

Returns

\Degami\PHPFormsApi\Form —

beforeRender()

beforeRender() : \Symfony\Component\HttpFoundation\Response|self

{@intheritdocs}

Throws

\App\Base\Exceptions\PermissionDeniedException
\Degami\Basics\Exceptions\BasicException

Returns

\Symfony\Component\HttpFoundation\Response|self —