| Conditions | 6 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | private function makeList($pages) |
||
| 30 | { |
||
| 31 | $output = ''; |
||
| 32 | if (count($pages)) { |
||
| 33 | $output = ' |
||
| 34 | <ul>'; |
||
| 35 | foreach ($pages as $page) { |
||
| 36 | if (!($page instanceof ErrorPage) && $page->ShowInMenus && $page->Title != $this->Title) { |
||
| 37 | $output .= ' |
||
| 38 | <li><a href="'.$page->URLSegment.'" title="Go to the '.Convert::raw2xml($page->Title).' page">'.Convert::raw2xml($page->MenuTitle).'</a>'; |
||
| 39 | $whereStatement = 'ParentID = '.$page->ID; |
||
| 40 | $childPages = DataObject::get('Page', $whereStatement); |
||
| 41 | $output .= $this->makeList($childPages); |
||
| 42 | $output .= '</li>'; |
||
| 43 | } |
||
| 44 | } |
||
| 45 | $output .= ' |
||
| 46 | </ul>'; |
||
| 47 | } |
||
| 48 | return $output; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |