|
@@ 174-177 (lines=4) @@
|
| 171 |
|
public function getParentOfClass($class) |
| 172 |
|
{ |
| 173 |
|
// Check for namespace alias |
| 174 |
|
if (strpos($class, ':') !== false) { |
| 175 |
|
list($namespaceAlias, $simpleClassName) = explode(':', $class); |
| 176 |
|
$class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
| 177 |
|
} |
| 178 |
|
if ($this->getParent() === null) { |
| 179 |
|
return null; |
| 180 |
|
} |
|
@@ 236-239 (lines=4) @@
|
| 233 |
|
public function getChildrenOfClass($class) |
| 234 |
|
{ |
| 235 |
|
// Check for namespace alias |
| 236 |
|
if (strpos($class, ':') !== false) { |
| 237 |
|
list($namespaceAlias, $simpleClassName) = explode(':', $class); |
| 238 |
|
$class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
| 239 |
|
} |
| 240 |
|
$result = array(); |
| 241 |
|
$children = $this->getChildren(); |
| 242 |
|
foreach ($children as $child) { |
|
@@ 261-264 (lines=4) @@
|
| 258 |
|
public function getChildOfClass($class) |
| 259 |
|
{ |
| 260 |
|
// Check for namespace alias |
| 261 |
|
if (strpos($class, ':') !== false) { |
| 262 |
|
list($namespaceAlias, $simpleClassName) = explode(':', $class); |
| 263 |
|
$class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
| 264 |
|
} |
| 265 |
|
foreach ($this->getChildren() as $child) { |
| 266 |
|
if ($child->getPage() instanceof $class) { |
| 267 |
|
return $child; |