class ExposedFormCache (View source)

Caches exposed forms, as they are heavy to generate.

Properties

protected array $cache

Stores the exposed form data.

Methods

setForm(string $view_id, string $display_id, array $form_output)

Save the Views exposed form for later use.

array|bool
getForm(string $view_id, string $display_id)

Retrieves the views exposed form from cache.

reset()

Rests the form cache.

Details

setForm(string $view_id, string $display_id, array $form_output)

Save the Views exposed form for later use.

Parameters

string $view_id

The views ID.

string $display_id

The current view display name.

array $form_output

The form structure. Only needed when inserting the value.

array|bool getForm(string $view_id, string $display_id)

Retrieves the views exposed form from cache.

Parameters

string $view_id

The views ID.

string $display_id

The current view display name.

Return Value

array|bool

The form structure, if any, otherwise FALSE.

reset()

Rests the form cache.