function panels_renderer_ipe::render_region 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_region()
Add an 'empty' pane placeholder above all the normal panes.
Parameters
$region_id:
$panes:
Overrides panels_renderer_editor::render_region
File
- panels_ipe/
plugins/ display_renderers/ panels_renderer_ipe.class.php, line 234
Class
- panels_renderer_ipe
- Renderer class for all In-Place Editor (IPE) behavior.
Code
function render_region($region_id, $panes) {
if (!$this
->access()) {
return parent::render_region($region_id, $panes);
}
// Generate this region's 'empty' placeholder pane from the IPE plugin.
$empty_ph = theme('panels_ipe_placeholder_pane', array(
'region_id' => $region_id,
'region_title' => $this->plugins['layout']['regions'][$region_id],
));
// Wrap the placeholder in some guaranteed markup.
$control = '<div class="panels-ipe-placeholder panels-ipe-on panels-ipe-portlet-marker panels-ipe-portlet-static">' . $empty_ph . theme('panels_ipe_add_pane_button', array(
'region_id' => $region_id,
'display' => $this->display,
'renderer' => $this,
)) . "</div>";
$output = parent::render_region($region_id, $panes);
$output = theme('panels_ipe_region_wrapper', array(
'output' => $output,
'region_id' => $region_id,
'display' => $this->display,
'controls' => $control,
'renderer' => $this,
));
$classes = 'panels-ipe-region';
return "<div id='panels-ipe-regionid-{$region_id}' class='panels-ipe-region'>{$output}</div>";
}