ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SpgrContainer.php
Go to the documentation of this file.
1<?php
36{
42 private $_parent;
43
49 private $_children = array();
50
56 public function setParent($parent)
57 {
58 $this->_parent = $parent;
59 }
60
66 public function getParent()
67 {
68 return $this->_parent;
69 }
70
76 public function addChild($child)
77 {
78 $this->_children[] = $child;
79 $child->setParent($this);
80 }
81
85 public function getChildren()
86 {
87 return $this->_children;
88 }
89
95 public function getAllSpContainers()
96 {
97 $allSpContainers = array();
98
99 foreach ($this->_children as $child) {
101 $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers());
102 } else {
103 $allSpContainers[] = $child;
104 }
105 }
106
107 return $allSpContainers;
108 }
109}
An exception for terminatinating execution or to throw for unit testing.
getParent()
Get the parent Shape Group Container if any.
setParent($parent)
Set parent Shape Group Container.
getAllSpContainers()
Recursively get all spContainers within this spgrContainer.
getChildren()
Get collection of Shape Containers.