function og_panels_load_display in Organic groups 6
Same name and namespace in other branches
- 5.8 og_panels.module \og_panels_load_display()
- 5 og_panels.module \og_panels_load_display()
- 5.3 og_panels.module \og_panels_load_display()
- 5.7 og_panels.module \og_panels_load_display()
Load an og_panel's display information.
Loads a panels display object with various parameters, depending on the information passed into the load function.
Parameters
int $did: The did of the panels display.
object $group_node = NULL: The node object for the group to which the panel is attached.
bool $ct = FALSE: If TRUE, content_types are also loaded into the $display object
Return value
mixed Either returns a display object, or FALSE if no display was found with the parameters provided.
4 calls to og_panels_load_display()
- og_panels_edit_content in modules/
og_panels/ og_panels.module - Pass through to the panels content editor.
- og_panels_edit_layout in modules/
og_panels/ og_panels.module - Pass through to the panels layout editor.
- og_panels_edit_layout_settings in modules/
og_panels/ og_panels.module - Pass through to the panels layout settings editor.
- og_panels_page in modules/
og_panels/ og_panels.module - A menu callback. Renders an og_panel based upon its display ID.
File
- modules/
og_panels/ og_panels.module, line 405
Code
function og_panels_load_display($did, $group_node = NULL, $ct = FALSE) {
panels_load_include('plugins');
$display = panels_load_display($did);
if (is_object($group_node)) {
$display->context = array(
'og_panels' => panels_context_create('group', $group_node),
);
if ($ct) {
panels_load_include('common');
$display->content_types = panels_common_get_allowed_types('og_panels', $display->context);
}
}
return is_object($display) ? $display : FALSE;
}