protected function CachePluginBase::gatherHeaders

Gather the JS/CSS from the render array, the html head from the band data.

1 call to CachePluginBase::gatherHeaders()
CachePluginBase::cacheSet in drupal/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php
Save data to the cache.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php, line 225
Definition of Drupal\views\Plugin\views\cache\CachePluginBase.

Class

CachePluginBase
The base plugin to handle caching.

Namespace

Drupal\views\Plugin\views\cache

Code

protected function gatherHeaders() {

  // Simple replacement for head
  if (isset($this->storage['head'])) {
    $this->storage['head'] = str_replace($this->storage['head'], '', drupal_add_html_head());
  }
  else {
    $this->storage['head'] = '';
  }
  $attached = drupal_render_collect_attached($this->storage['output']);
  $this->storage['css'] = $attached['css'];
  $this->storage['js'] = $attached['js'];
}