You are here

function panels_renderer_ipe::render_pane_content in Panels 6.3

Same name and namespace in other branches
  1. 7.3 panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php \panels_renderer_ipe::render_pane_content()

Render the interior contents of a single pane.

This method retrieves pane content and produces a ready-to-render content object. It also manages pane-specific caching.

Parameters

stdClass $pane: A Panels pane object, as loaded from the database.

Return value

stdClass $content A renderable object, containing a subject, content, etc. Based on the renderable objects used by the block system.

Overrides panels_renderer_standard::render_pane_content

File

panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php, line 74

Class

panels_renderer_ipe
Renderer class for all In-Place Editor (IPE) behavior.

Code

function render_pane_content(&$pane) {
  $content = parent::render_pane_content($pane);
  if (!is_object($content)) {
    $content = new StdClass();
  }

  // Ensure that empty panes have some content.
  if (empty($content->content)) {

    // Get the administrative title.
    $content_type = ctools_get_content_type($pane->type);
    $title = ctools_content_admin_title($content_type, $pane->subtype, $pane->configuration, $this->display->context);
    $content->content = t('Placeholder for empty "@title"', array(
      '@title' => $title,
    ));
    $pane->IPE_empty = TRUE;
  }
  return $content;
}