/** * Override & call the parent, then pass output through to the dnd wrapper * theme function. * * @param $pane */ function render_pane(&$pane) { $output = parent::render_pane($pane); if (empty($output)) { return; } if (empty($pane->IPE_empty)) { // Add an inner layer wrapper to the pane content before placing it into // draggable portlet $output = "<div class=\"panels-ipe-portlet-content\">{$output}</div>"; } else { $output = "<div class=\"panels-ipe-portlet-content panels-ipe-empty-pane\">{$output}</div>"; } // Hand it off to the plugin/theme for placing draggers/buttons $output = theme('panels_ipe_pane_wrapper', $output, $pane, $this->display, $this); return "<div id=\"panels-ipe-paneid-{$pane->pid}\" class=\"panels-ipe-portlet-wrapper panels-ipe-portlet-marker\">" . $output . "</div>"; }
/** * Override & call the parent, then pass output through to the dnd wrapper * theme function. * * @param $pane */ function render_pane(&$pane) { $output = parent::render_pane($pane); if (empty($output)) { return; } if (!$this->access()) { return $output; } // If there are region locks, add them. if (!empty($pane->locks['type']) && $pane->locks['type'] == 'regions') { static $key = NULL; $javascript =& drupal_static('drupal_add_js', array()); // drupal_add_js breaks as we add these, but we can't just lump them // together because panes can be rendered independently. So game the system: if (empty($key)) { $settings['Panels']['RegionLock'][$pane->pid] = $pane->locks['regions']; drupal_add_js($settings, 'setting'); // These are just added via [] so we have to grab the last one // and reference it. $keys = array_keys($javascript['settings']['data']); $key = end($keys); } else { $javascript['settings']['data'][$key]['Panels']['RegionLock'][$pane->pid] = $pane->locks['regions']; } } if (empty($pane->IPE_empty)) { // Add an inner layer wrapper to the pane content before placing it into // draggable portlet $output = "<div class=\"panels-ipe-portlet-content\">{$output}</div>"; } else { $output = "<div class=\"panels-ipe-portlet-content panels-ipe-empty-pane\">{$output}</div>"; } // Hand it off to the plugin/theme for placing draggers/buttons $output = theme('panels_ipe_pane_wrapper', array('output' => $output, 'pane' => $pane, 'display' => $this->display, 'renderer' => $this)); if (!empty($pane->locks['type']) && $pane->locks['type'] == 'immovable') { return "<div id=\"panels-ipe-paneid-{$pane->pid}\" class=\"panels-ipe-nodrag panels-ipe-portlet-wrapper panels-ipe-portlet-marker\">" . $output . "</div>"; } return "<div id=\"panels-ipe-paneid-{$pane->pid}\" class=\"panels-ipe-portlet-wrapper panels-ipe-portlet-marker\">" . $output . "</div>"; }