You are here

function panels_renderer_standard::render in Panels 7.3

Same name and namespace in other branches
  1. 6.3 plugins/display_renderers/panels_renderer_standard.class.php \panels_renderer_standard::render()

Build inner content, then hand off to layout-specified theme function for final render step.

This is the outermost method in the Panels render pipeline. It calls the inner methods, which return a content array, which is in turn passed to the theme function specified in the layout plugin.

Return value

string Themed & rendered HTML output.

1 call to panels_renderer_standard::render()
panels_renderer_editor::render in plugins/display_renderers/panels_renderer_editor.class.php
Build inner content, then hand off to layout-specified theme function for final render step.
1 method overrides panels_renderer_standard::render()
panels_renderer_editor::render in plugins/display_renderers/panels_renderer_editor.class.php
Build inner content, then hand off to layout-specified theme function for final render step.

File

plugins/display_renderers/panels_renderer_standard.class.php, line 384

Class

panels_renderer_standard

Code

function render() {

  // Let the display refer back to the renderer.
  $this->display->renderer_handler = $this;

  // Attach out-of-band data first.
  $this
    ->add_meta();
  if (empty($this->display->cache['method']) || !empty($this->display->skip_cache)) {
    return $this
      ->render_layout();
  }
  else {
    $cache = panels_get_cached_content($this->display, $this->display->args, $this->display->context);
    if ($cache === FALSE) {
      $cache = new panels_cache_object();
      $cache
        ->set_content($this
        ->render_layout());
      panels_set_cached_content($cache, $this->display, $this->display->args, $this->display->context);
    }
    return $cache->content;
  }
}