Documentation

ReuseGuideBoxForm extends FormBase
in package

Provides a form to reuse existing guide box items.

Table of Contents

Methods

boxItemSelectedAjaxCallback()  : array<string|int, mixed>
AJAX callback for when a box is selected.
buildForm()  : array<string|int, mixed>
Builds the form for reusing a guide box.
getFormId()  : string
{@inheritdoc}
submitAjax()  : AjaxResponse
AJAX callback for submitting the form.
submitForm()  : void
Handles the form submission.
validateFields()  : void
Validates the form fields.
prefillSelectedBoxItem()  : void
Pre-fills form fields based on the selected guide box.

Methods

boxItemSelectedAjaxCallback()

AJAX callback for when a box is selected.

public boxItemSelectedAjaxCallback(array<string|int, mixed> &$form, FormStateInterface $form_state) : array<string|int, mixed>
Parameters
$form : array<string|int, mixed>
$form_state : FormStateInterface
Return values
array<string|int, mixed>

The updated part of the form.

buildForm()

Builds the form for reusing a guide box.

public buildForm(array<string|int, mixed> $form, FormStateInterface $form_state[,  $ids = null ]) : array<string|int, mixed>
Parameters
$form : array<string|int, mixed>
$form_state : FormStateInterface
$ids : = null

Contextual IDs or parameters passed to the form.

Return values
array<string|int, mixed>

The form array.

submitAjax()

AJAX callback for submitting the form.

public submitAjax(array<string|int, mixed> &$form, FormStateInterface $form_state) : AjaxResponse
Parameters
$form : array<string|int, mixed>
$form_state : FormStateInterface
Tags
throws
EntityMalformedException
Return values
AjaxResponse

submitForm()

Handles the form submission.

public submitForm(array<string|int, mixed> &$form, FormStateInterface $form_state) : void

Processes the reuse of the selected guide box based on form inputs.

Parameters
$form : array<string|int, mixed>
$form_state : FormStateInterface
Tags
throws
EntityStorageException

validateFields()

Validates the form fields.

public validateFields(array<string|int, mixed> &$form, FormStateInterface $form_state) : void
Parameters
$form : array<string|int, mixed>
$form_state : FormStateInterface

prefillSelectedBoxItem()

Pre-fills form fields based on the selected guide box.

private prefillSelectedBoxItem(array<string|int, mixed> &$form, FormStateInterface $form_state) : void
Parameters
$form : array<string|int, mixed>
$form_state : FormStateInterface

        
On this page

Search results