public function ExposedFormCache::getForm in Drupal 9
Same name and namespace in other branches
- 8 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];
}
}