function panelizer_panelizer_task_test in Panelizer 7.2
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 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_test()
Determine if the panelizer task handler should fire.
This returns true if the configured entity 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 an entity view. NOTE: This is named panelizer_node for historical reasons. It is too much of a pain to change the name of a task handler. This panelizes any entity not just a node.
File
- plugins/
task_handlers/ panelizer_node.inc, line 253 - This is the task handler plugin to handle an entity view. NOTE: This is named panelizer_node for historical reasons. It is too much of a pain to change the name of a task handler. This panelizes any entity not just a node.
Code
function panelizer_panelizer_task_test($handler, $base_contexts) {
if (empty($base_contexts)) {
return;
}
$context = _panelizer_panelizer_task_get_context($handler, $base_contexts);
if (empty($context->data)) {
return;
}
$entity =& $context->data;
return !empty($entity->panelizer->display);
}