also load Components of parent classes
This commit is contained in:
parent
200b1fe937
commit
6a5f3739cc
1 changed files with 9 additions and 4 deletions
|
@ -165,10 +165,6 @@
|
|||
// Response speichern
|
||||
$this->response = $response;
|
||||
|
||||
|
||||
// Linker erstellen
|
||||
$this->set('linker', new \nre\core\Linker($request));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -325,6 +321,15 @@
|
|||
if(!is_array($components)) {
|
||||
$components = array($components);
|
||||
}
|
||||
// Components of parent classes
|
||||
$parent = $this;
|
||||
while($parent = get_parent_class($parent))
|
||||
{
|
||||
$properties = get_class_vars($parent);
|
||||
if(array_key_exists('components', $properties)) {
|
||||
$components = array_merge($components, $properties['components']);
|
||||
}
|
||||
}
|
||||
|
||||
// Load components
|
||||
foreach($components as &$component)
|
||||
|
|
Loading…
Reference in a new issue