/**
  * Returns an array of children for a specified section reference
  *
  * @param string $reference
  * @param int $levelsDown OPTIONAL
  *
  * @return array
  */
 public function getSectionChildren($reference, $levelsDown = null)
 {
     $reference = strtolower(KSSSection::normalizeReference($reference));
     $this->sortSections();
     $sectionKeys = array_keys($this->sections);
     $sections = array();
     $maxDepth = null;
     if ($levelsDown !== null) {
         $maxDepth = KSSSection::calcDepth($reference) + $levelsDown;
     }
     $reference = KSSSection::trimReference($reference);
     $reference .= '.';
     foreach ($sectionKeys as $sectionKey) {
         $testSectionKey = strtolower(KSSSection::normalizeReference($sectionKey));
         // Only get sections within that level. Do not get the level itself
         if (strpos($testSectionKey . '.', $reference) === 0 && $testSectionKey . '.' != $reference) {
             $section = $this->sections[$sectionKey];
             if ($maxDepth !== null && $section->getDepth() > $maxDepth) {
                 continue;
             }
             $sections[$sectionKey] = $section;
         }
     }
     return $sections;
 }
 public function getReference()
 {
     $filter = URLSegmentFilter::create();
     return $filter->filter($this->section->getReference() . '-' . $this->getName());
 }