interface FormCacheInterface (View source)

Provides an interface for the caching of a form and its form state.

Methods

getCache(string $form_build_id, FormStateInterface $form_state)

Fetches a form from the cache.

setCache(string $form_build_id, array $form, FormStateInterface $form_state)

Stores a form in the cache.

deleteCache(string $form_build_id)

Deletes a form in the cache.

Details

getCache(string $form_build_id, FormStateInterface $form_state)

Fetches a form from the cache.

Parameters

string $form_build_id

The unique form build ID.

FormStateInterface $form_state

The current state of the form.

setCache(string $form_build_id, array $form, FormStateInterface $form_state)

Stores a form in the cache.

Parameters

string $form_build_id

The unique form build ID.

array $form

The form to cache.

FormStateInterface $form_state

The current state of the form.

deleteCache(string $form_build_id)

Deletes a form in the cache.

Parameters

string $form_build_id

The unique form build ID.