function views_plugin_cache::restore_headers

Same name in other branches
  1. 7.x-3.x plugins/views_plugin_cache.inc \views_plugin_cache::restore_headers()

Restore out of band data saved to cache. Copied from Panels.

1 call to views_plugin_cache::restore_headers()
views_plugin_cache::cache_get in plugins/views_plugin_cache.inc
Retrieve data from the cache.

File

plugins/views_plugin_cache.inc, line 244

Class

views_plugin_cache
The base plugin to handle caching.

Code

function restore_headers() {
    if (!empty($this->storage['head'])) {
        drupal_set_html_head($this->storage['head']);
    }
    if (!empty($this->storage['css'])) {
        foreach ($this->storage['css'] as $args) {
            call_user_func_array('drupal_add_css', $args);
        }
    }
    if (!empty($this->storage['js'])) {
        foreach ($this->storage['js'] as $args) {
            call_user_func_array('drupal_add_js', $args);
        }
    }
}