function panels_optional_context::select in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/plugins.inc \panels_optional_context::select()
Overrides panels_required_context::select
File
- includes/
plugins.inc, line 120 - plugins.inc
Class
Code
function select($contexts, $context) {
$this
->add_empty($contexts);
if (empty($context)) {
return $contexts['empty'];
}
$result = parent::select($contexts, $context);
// Don't flip out if it can't find the context; this is optional, put
// in an empty.
if ($result == FALSE) {
$result = $contexts['empty'];
}
return $result;
}