/** * @param EntryPoint $entryPoint * @return EntryPoint[] */ public function getAllEntryPoints(EntryPoint $entryPoint = null) { $entryPoints = array(); if ($entryPoint) { $subEntryPoints = $entryPoint->getChildren(); } else { $subEntryPoints = $this->getEntryPoints(); } if (null !== $subEntryPoints) { foreach ($subEntryPoints as $subEntryPoint) { $entryPoints[$this->getBundleName() . '/' . $subEntryPoint->getFullPath()] = $subEntryPoint; $entryPoints = array_merge($entryPoints, $this->getAllEntryPoints($subEntryPoint)); } } return $entryPoints; }