1 layout.class.inc | private Layout::getContextFromRelationship(LayoutRelationship $relationship, LayoutContext $source_context) |
Parameters
LayoutRelationship $relationship: A relationship object.
LayoutContext $source_context: The context this relationship is based upon.
Return value
LayoutContext|FALSE: A context object if one can be loaded.
File
- core/
modules/ layout/ includes/ layout.class.inc, line 946 - Class for loading, modifying, and executing a layout.
Class
- Layout
- @file Class for loading, modifying, and executing a layout.
Code
private function getContextFromRelationship(LayoutRelationship $relationship, LayoutContext $source_context) {
$new_context = clone($source_context);
$context = $relationship->getContext($new_context);
if ($context) {
$context->usageType = LayoutContext::USAGE_TYPE_RELATIONSHIP;
return $context;
}
return FALSE;
}