示例#1
0
 public function __construct(Area $area, ProjectAreaRepository $repository)
 {
     $this->area = $area;
     $this->repository = $repository;
     $this->name = $this->area->getName();
     $this->territory = $this->area->getTerritory();
     $this->customData = $this->area->getCustomData();
 }
 public function render(CantigaController $controller, Request $request, Area $area)
 {
     $data = $area->getCustomData();
     if (!empty($data['positionLat']) && !empty($data['positionLng'])) {
         return $this->templating->render('WioEdkBundle:Extension:area-information-map.html.twig', ['positionLat' => $data['positionLat'], 'positionLng' => $data['positionLng']]);
     }
     return '';
 }
示例#3
0
 private function canApproveProfile(Area $area)
 {
     $data = $area->getCustomData();
     if (!empty($data['positionLat']) && !empty($data['positionLng']) && !empty($data['ewcDate']) && !empty($data['ewcDate']['year'])) {
         if ($area->getPercentCompleteness() > self::REQUIRED_PROFILE_COMPLETENESS) {
             return true;
         }
     }
     return false;
 }