function panels_renderer_ipe::render_pane_content in Panels 7.3
Same name and namespace in other branches
- 6.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
object $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 200
Class
- panels_renderer_ipe
- Renderer class for all In-Place Editor (IPE) behavior.
Code
function render_pane_content(&$pane) {
if (!$this
->access()) {
return parent::render_pane_content($pane);
}
if (!empty($pane->shown) && panels_pane_access($pane, $this->display)) {
$content = parent::render_pane_content($pane);
}
// Ensure that empty panes have some content.
if (empty($content) || empty($content->content)) {
if (empty($content)) {
$content = new stdClass();
}
// 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 or inaccessible "@title"', array(
'@title' => html_entity_decode($title, ENT_QUOTES),
));
// Add these to prevent notices.
$content->type = 'panels_ipe';
$content->subtype = 'panels_ipe';
$pane->IPE_empty = TRUE;
}
return $content;
}