interface FormCacheInterface

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Form/FormCacheInterface.php \Drupal\Core\Form\FormCacheInterface
  2. 8.9.x core/lib/Drupal/Core/Form/FormCacheInterface.php \Drupal\Core\Form\FormCacheInterface
  3. 10 core/lib/Drupal/Core/Form/FormCacheInterface.php \Drupal\Core\Form\FormCacheInterface

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

Hierarchy

Expanded class hierarchy of FormCacheInterface

All classes that implement FormCacheInterface

File

core/lib/Drupal/Core/Form/FormCacheInterface.php, line 8

Namespace

Drupal\Core\Form
View source
interface FormCacheInterface {
    
    /**
     * Fetches a form from the cache.
     *
     * @param string $form_build_id
     *   The unique form build ID.
     * @param \Drupal\Core\Form\FormStateInterface $form_state
     *   The current state of the form.
     */
    public function getCache($form_build_id, FormStateInterface $form_state);
    
    /**
     * Stores a form in the cache.
     *
     * @param string $form_build_id
     *   The unique form build ID.
     * @param array $form
     *   The form to cache.
     * @param \Drupal\Core\Form\FormStateInterface $form_state
     *   The current state of the form.
     */
    public function setCache($form_build_id, $form, FormStateInterface $form_state);
    
    /**
     * Deletes a form in the cache.
     *
     * @param string $form_build_id
     *   The unique form build ID.
     */
    public function deleteCache($form_build_id);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
FormCacheInterface::deleteCache public function Deletes a form in the cache. 2
FormCacheInterface::getCache public function Fetches a form from the cache. 2
FormCacheInterface::setCache public function Stores a form in the cache. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.