function ExposedFormCache::getForm
Same name in other branches
- 9 core/modules/views/src/ExposedFormCache.php \Drupal\views\ExposedFormCache::getForm()
- 8.9.x core/modules/views/src/ExposedFormCache.php \Drupal\views\ExposedFormCache::getForm()
- 11.x 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 45
Class
- ExposedFormCache
- Caches exposed forms, as they are heavy to generate.
Namespace
Drupal\viewsCode
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];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.