function FormState::getCacheableArray

Same name in other branches
  1. 9 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::getCacheableArray()
  2. 8.9.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::getCacheableArray()
  3. 11.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::getCacheableArray()

Overrides FormStateInterface::getCacheableArray

File

core/lib/Drupal/Core/Form/FormState.php, line 927

Class

FormState
Stores information about the state of a form.

Namespace

Drupal\Core\Form

Code

public function getCacheableArray() {
    return [
        'build_info' => $this->getBuildInfo(),
        'response' => $this->getResponse(),
        'programmed' => $this->isProgrammed(),
        'programmed_bypass_access_check' => $this->isBypassingProgrammedAccessChecks(),
        'process_input' => $this->isProcessingInput(),
        'has_file_element' => $this->hasFileElement(),
        'storage' => $this->getStorage(),
        // Use the properties directly, since self::isCached() combines them and
        // cannot be relied upon.
'cache' => $this->cache,
        'no_cache' => $this->no_cache,
    ];
}

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