function panels_relationship_get_context in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/plugins.inc \panels_relationship_get_context()
Fetch a context from a relationship, given the context input.
1 call to panels_relationship_get_context()
- panels_relationship_get_contexts in includes/
plugins.inc - Fetch all active relationships
File
- includes/
plugins.inc, line 934 - plugins.inc
Code
function panels_relationship_get_context($relationship, $arg) {
if ($function = panels_plugin_get_function('relationships', $relationship['name'], 'context')) {
$context = $function($arg, $relationship['relationship_settings']);
if ($context) {
$context->identifier = $relationship['identifier'];
$context->page_title = $relationship['title'];
$context->keyword = $relationship['keyword'];
return $context;
}
}
}