function panels_context_create_term in Panels 6.2
Same name and namespace in other branches
- 5.2 contexts/term.inc \panels_context_create_term()
It's important to remember that $conf is optional here, because contexts are not always created from the UI.
1 string reference to 'panels_context_create_term'
- panels_term_panels_contexts in contexts/
term.inc - @file contexts/term.inc
File
- contexts/
term.inc, line 28 - contexts/term.inc
Code
function panels_context_create_term($empty, $data = NULL, $conf = FALSE) {
$context = new panels_context('term');
$context->plugin = 'term';
if ($empty) {
return $context;
}
if ($conf) {
$data = taxonomy_get_term($data['tid']);
}
if (!empty($data)) {
$context->data = $data;
$context->title = $data->name;
$context->argument = $data->tid;
return $context;
}
}