function panels_new_pane in Panels 6.3
Same name and namespace in other branches
- 8.3 panels.module \panels_new_pane()
- 6.2 panels.module \panels_new_pane()
- 7.3 panels.module \panels_new_pane()
Create a new pane.
@todo -- use schema API for some of this?
Related topics
2 calls to panels_new_pane()
- panels_layouts_ui::edit_form in plugins/
export_ui/ panels_layouts_ui.class.php - Provide the actual editing form.
- panels_renderer_editor::ajax_add_pane in plugins/
display_renderers/ panels_renderer_editor.class.php - AJAX entry point to add a new pane.
File
- ./
panels.module, line 733 - panels.module
Code
function panels_new_pane($type, $subtype, $set_defaults = FALSE) {
ctools_include('export');
$pane = ctools_export_new_object('panels_pane', FALSE);
$pane->pid = 'new';
$pane->type = $type;
$pane->subtype = $subtype;
if ($set_defaults) {
$content_type = ctools_get_content_type($type);
$content_subtype = ctools_content_get_subtype($content_type, $subtype);
$pane->configuration = ctools_content_get_defaults($content_type, $content_subtype);
}
return $pane;
}