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