getChildren() public method

public getChildren ( ) : EntryPoint[]
return EntryPoint[]
コード例 #1
0
ファイル: Bundle.php プロジェクト: jarves/jarves
 /**
  * @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;
 }