function panels_ajax_render in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/ajax.inc \panels_ajax_render()
13 calls to panels_ajax_render()
- panels_ajax in includes/
display_edit.inc - panels_ajax_add_config in includes/
display_edit.inc - Entry point for AJAX: Add pane configuration.
- panels_ajax_add_content in includes/
display_edit.inc - Entry point for AJAX: 'Add Content' modal form, from which the user selects the type of pane to add.
- panels_ajax_cache in includes/
display_edit.inc - Entry point for AJAX modal: configure pane
- panels_ajax_cache_settings in includes/
display_edit.inc - Handle the cache settings form
File
- ./
panels.module, line 165 - panels.module Core API for Panels. Provides display editing and rendering capabilities.
Code
function panels_ajax_render($output = NULL, $title = NULL, $url = NULL) {
if (!is_object($output)) {
$temp = new stdClass();
$temp->output = $output;
switch ($output) {
case 'dismiss':
$temp->type = $output;
break;
default:
$temp->type = 'display';
}
$temp->title = $title;
$temp->url = $url;
$output = $temp;
}
if (!$output->output || !$output->type) {
$output->output = t('The input was invalid');
$output->type = 'display';
$output->title = t('Error');
}
drupal_set_header('Content-Type: text/javascript; charset=utf-8');
print drupal_to_js($output);
exit;
}