You are here

function panels_renderer_editor::ajax_panel_title in Panels 6.3

Same name and namespace in other branches
  1. 7.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_renderer_editor::ajax_panel_title()

AJAX entry point to select which pane is currently the title.

Parameters

string $pid: The pane id for the pane object whose title state we're setting.

File

plugins/display_renderers/panels_renderer_editor.class.php, line 815
Class file to control the main Panels editor.

Class

panels_renderer_editor
@file Class file to control the main Panels editor.

Code

function ajax_panel_title($pid = NULL) {
  if (empty($this->display->content[$pid])) {
    ctools_ajax_render_error(t('Invalid pane id.'));
  }
  $pane =& $this->display->content[$pid];
  $old_title = !empty($this->display->title_pane) ? $this->display->title_pane : NULL;
  $this->display->title_pane = $pid;
  panels_edit_cache_set($this->cache);
  $this
    ->command_update_pane($pane);
  if ($old_title && !empty($this->cache->display->content[$old_title])) {
    $this
      ->command_update_pane($this->cache->display->content[$old_title]);
  }
}