class ViewsFormMainForm implements FormInterface, TrustedCallbackInterface (View source)

Methods

string
getFormId()

Returns a unique string identifying the form.

static array
preRenderViewsForm(array $element)

Replaces views substitution placeholders.

static string[]
trustedCallbacks()

Lists the trusted callbacks provided by the implementing class.

array
buildForm(array $form, FormStateInterface $form_state, ViewExecutable $view = NULL, $output = [])

Form constructor.

validateForm(array $form, FormStateInterface $form_state)

Form validation handler.

submitForm(array $form, FormStateInterface $form_state)

Form submission handler.

Details

string getFormId()

Returns a unique string identifying the form.

The returned ID should be a unique string that can be a valid PHP function name, since it's used in hook implementation names such as hook_form_FORM_ID_alter().

Return Value

string

The unique string identifying the form.

static array preRenderViewsForm(array $element)

Replaces views substitution placeholders.

Parameters

array $element

An associative array containing the properties of the element. Properties used: #substitutions, #children.

Return Value

array

The $element with prepared variables ready for #theme 'form' in views_form_views_form.

static string[] trustedCallbacks()

Lists the trusted callbacks provided by the implementing class.

Trusted callbacks are public methods on the implementing class and can be invoked via \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback().

Return Value

string[]

List of method names implemented by the class that can be used as trusted callbacks.

array buildForm(array $form, FormStateInterface $form_state, ViewExecutable $view = NULL, $output = [])

Form constructor.

Parameters

array $form

An associative array containing the structure of the form.

FormStateInterface $form_state

The current state of the form.

ViewExecutable $view
$output

Return Value

array

The form structure.

validateForm(array $form, FormStateInterface $form_state)

Form validation handler.

Parameters

array $form

An associative array containing the structure of the form.

FormStateInterface $form_state

The current state of the form.

submitForm(array $form, FormStateInterface $form_state)

Form submission handler.

Parameters

array $form

An associative array containing the structure of the form.

FormStateInterface $form_state

The current state of the form.