Exemplo n.º 1
0
 private function poiRemove(POI $poi)
 {
     $id = $poi->getId();
     POI::removePoi($poi);
     $this->init->em->remove($poi);
     $this->init->em->flush();
     $this->assertEquals(null, $this->init->poiRepo->find($id));
 }
Exemplo n.º 2
0
 /**
  * @param POI $poi
  * @return POIListDTO
  */
 public function poiToPOIListDTO(POI $poi)
 {
     $poiListDTO = new POIListDTO();
     $poiListDTO->id = $poi->getId();
     $poiListDTO->isActive = $poi->getIsActive();
     $poiListDTO->name = $poi->getName();
     $poiListDTO->department = $poi->getDepartment();
     $poiListDTO->telephone = $poi->getTelephone();
     $poiListDTO->street = $poi->getAddress()->getStreet();
     $poiListDTO->city = $poi->getAddress()->getCity();
     $poiListDTO->keywords = $poi->getKeywordsAsString();
     return $poiListDTO;
 }