function PanelizerEntityNode::get_default_display in Panelizer 7.2
Same name and namespace in other branches
- 7.3 plugins/entity/PanelizerEntityNode.class.php \PanelizerEntityNode::get_default_display()
Provide a default display for newly panelized entities.
This should be implemented by the entity plugin.
Overrides PanelizerEntityDefault::get_default_display
File
- plugins/
entity/ PanelizerEntityNode.class.php, line 80 - Class for the Panelizer node entity plugin.
Class
- PanelizerEntityNode
- Panelizer Entity node plugin class.
Code
function get_default_display() {
$display = new panels_display();
$display->layout = 'flexible';
$display->layout_settings = array();
$display->panel_settings = array(
'style_settings' => array(
'default' => NULL,
'center' => NULL,
),
);
$display->cache = array();
$display->title = '';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-1';
$pane->panel = 'center';
$pane->type = 'node_content';
$pane->subtype = 'node_content';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'links' => 1,
'page' => 1,
'no_extras' => 0,
'override_title' => 0,
'override_title_text' => '',
'identifier' => '',
'link' => 0,
'leave_node_title' => 0,
'context' => 'panelizer',
'build_mode' => 'full',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-1'] = $pane;
if (module_exists('comment')) {
$display->panels['center'][0] = 'new-1';
$pane = new stdClass();
$pane->pid = 'new-2';
$pane->panel = 'center';
$pane->type = 'node_comments';
$pane->subtype = 'node_comments';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'mode' => '4',
'order' => '2',
'comments_per_page' => '50',
'context' => 'panelizer',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$display->content['new-2'] = $pane;
$display->panels['center'][1] = 'new-2';
$pane = new stdClass();
$pane->pid = 'new-3';
$pane->panel = 'center';
$pane->type = 'node_comment_form';
$pane->subtype = 'node_comment_form';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'anon_links' => 1,
'context' => 'panelizer',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 2;
$display->content['new-3'] = $pane;
}
$display->panels['center'][2] = 'new-3';
$display->hide_title = PANELS_TITLE_FIXED;
$display->title_pane = 'new-1';
return $display;
}