function panels_nid_displays in Panels 5.2
Same name and namespace in other branches
- 6.2 arguments/nid.inc \panels_nid_displays()
What additional displays does this argument provide?
1 string reference to 'panels_nid_displays'
- panels_nid_panels_arguments in arguments/
nid.inc - @file arguments/nid.inc
File
- arguments/
nid.inc, line 114 - arguments/nid.inc
Code
function panels_nid_displays($conf, $id) {
$displays = array();
if (!empty($conf['own_default'])) {
$displays['default'] = array(
'title' => t('Node ID @id Default', array(
'@id' => $id,
)),
'context' => 'node',
);
}
if (is_array($conf['displays'])) {
$options = array();
foreach (node_get_types() as $type => $info) {
$options[$type] = $info->name;
}
foreach (array_keys(array_filter($conf['displays'])) as $type) {
$displays[$type] = array(
'title' => t('Node ID @id @type', array(
'@id' => $id,
'@type' => $options[$type],
)),
// Tell it to base the template for this display off of the default.
'default' => 'default',
'context' => 'node',
);
}
}
return $displays;
}