1.20.x layout_relationship.inc | LayoutRelationship::__construct($plugin_name, $config) |
Constructor for LayoutRelationship objects.
Overrides LayoutHandler::__construct
File
- modules/
layout/ plugins/ relationships/ layout_relationship.inc, line 47 - Class that holds information relating to a layout's context relationships.
Class
- LayoutRelationship
- @file Class that holds information relating to a layout's context relationships.
Code
function __construct($plugin_name, $config) {
parent::__construct($plugin_name, $config);
$this->plugin = $plugin_name;
$properties = array(
'name',
'label',
'context',
);
foreach ($properties as $property) {
if (isset($config[$property])) {
$this->$property = $config[$property];
}
}
if (isset($config['settings']['relationship'])) {
list($plugin, $child) = explode(':', $config['settings']['relationship']);
$this->childDelta = ($child == 'relationship') ? NULL : $child;
}
}