示例#1
0
 /**
  * Transforms an id to a City Objet.
  *
  * @param  City|null $city
  * @return int
  */
 public function transform($city)
 {
     if (null === $city) {
         return "";
     }
     return $city->getId();
 }
示例#2
0
 /**
  * Remove cities
  *
  * @param \Enigmatic\CityBundle\Entity\City $cities
  */
 public function removeCity(\Enigmatic\CityBundle\Entity\City $cities)
 {
     $this->cities->removeElement($cities);
 }