function panelizer_panelizer_task_test in Panelizer 7
Same name and namespace in other branches
- 6 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_test()
- 7.3 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_test()
- 7.2 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_test()
Determine if the panelizer task handler should fire.
This returns true if the configured node is panelized and has a display.
1 string reference to 'panelizer_panelizer_task_test'
- panelizer_node.inc in plugins/
task_handlers/ panelizer_node.inc - This is the task handler plugin to handle node_view.
File
- plugins/
task_handlers/ panelizer_node.inc, line 96 - This is the task handler plugin to handle node_view.
Code
function panelizer_panelizer_task_test($handler, $base_contexts) {
if (empty($base_contexts)) {
return;
}
$context = reset($base_contexts);
if (empty($context->data)) {
return;
}
$node =& $context->data;
ctools_include('node', 'panelizer');
$panelizer = panelizer_load_node_panelizer($node);
if (empty($panelizer)) {
return FALSE;
}
// Load the display
$display = panelizer_load_display($panelizer);
if (empty($display)) {
return FALSE;
}
return TRUE;
}