You are here

public function ExposedFormCache::getForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/ExposedFormCache.php \Drupal\views\ExposedFormCache::getForm()

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.

File

core/modules/views/src/ExposedFormCache.php, line 50
Contains \Drupal\views\ExposedFormCache.

Class

ExposedFormCache
Caches exposed forms, as they are heavy to generate.

Namespace

Drupal\views

Code

public function getForm($view_id, $display_id) {

  // Return the form output, if any.
  if (empty($this->cache[$view_id][$display_id])) {
    return FALSE;
  }
  else {
    return $this->cache[$view_id][$display_id];
  }
}