function panels_vid_context in Panels 6.2
Same name and namespace in other branches
- 5.2 arguments/vid.inc \panels_vid_context()
Discover if this argument gives us the vocabulary we crave.
1 string reference to 'panels_vid_context'
- panels_vid_panels_arguments in arguments/
vid.inc - @file arguments/vid.inc
File
- arguments/
vid.inc, line 29 - arguments/vid.inc
Code
function panels_vid_context($arg = NULL, $conf = NULL, $empty = FALSE) {
// If unset it wants a generic, unfilled context.
if ($empty) {
return panels_context_create_empty('vocabulary');
}
if (!is_numeric($arg)) {
return PANELS_ARG_IS_BAD;
}
$vocabulary = taxonomy_vocabulary_load($arg);
if (!$vocabulary) {
return PANELS_ARG_IS_BAD;
}
return panels_context_create('vocabulary', $vocabulary);
}