private function prepareTargetList()
 {
     foreach ($this->allowedTargetList->getSections() as $section) {
         $name = $section->getName();
         $sections[$name] = array();
         foreach ($section->getTargetList() as $targetName => $target) {
             $targetEntity = $this->targetDao->findTarget($target);
             if (!$targetEntity) {
                 $targetEntity = $this->targetDao->createBlankTarget($target);
             }
             $this->preparedTargetList[$targetEntity->id] = $targetEntity;
             $this->preparedTargetSections[$name][$targetName] = $targetEntity;
         }
     }
 }
 public function renderSitemap()
 {
     $this->invalidLinkMode = self::INVALID_LINK_SILENT;
     $targetList = array();
     foreach ($this->allowedTargetList->getSections() as $section) {
         foreach ($section->getTargetList() as $target) {
             $link = $this->link('//:' . $target->presenter . ':' . $target->action, $target->id);
             if ($link == "#") {
                 continue;
             }
             $target = $this->targetDao->findTarget($target);
             $targetList[] = array("url" => $link, "changefreq" => $target && $target->meta ? $target->meta->sitemapChangeFreq : NULL, "priority" => $target && $target->meta ? $target->meta->sitemapPriority : NULL);
         }
     }
     $this->template->targetList = $targetList;
 }