function panels_renderer_editor::edit in Panels 6.3
Same name and namespace in other branches
- 7.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_renderer_editor::edit()
File
- plugins/
display_renderers/ panels_renderer_editor.class.php, line 19 - Class file to control the main Panels editor.
Class
- panels_renderer_editor
- @file Class file to control the main Panels editor.
Code
function edit() {
ctools_include('form');
$form_state = array(
'display' => &$this->display,
'renderer' => &$this,
'content_types' => $this->cache->content_types,
're_render' => FALSE,
'no_redirect' => TRUE,
'display_title' => !empty($this->cache->display_title),
'cache key' => $this->display->cache_key,
);
$output = ctools_build_form('panels_edit_display_form', $form_state);
if ($output) {
return $output;
}
// no output == submit
if (!$output) {
if (!empty($form_state['clicked_button']['#save-display'])) {
drupal_set_message(t('Panel content has been updated.'));
panels_save_display($this->display);
}
else {
drupal_set_message(t('Your changes have been discarded.'));
}
panels_cache_clear('display', $this->display->did);
return $this->display;
}
}