public function __construct(User $user, Property $property, Template $template) { $this->user = $user; $this->creation_date = new \DateTime(); $this->modification_date = $this->creation_date; $this->property = $property; $this->template = $template; $this->total_sent = 0; //Binding Flyer with Property $this->email = $user->getProfile()->getEmail(); $this->sender_name = $user->getProfile()->getFullName(); $this->email_reply = $user->getProfile()->getEmail(); $this->address = $property->getAddress(); $this->map_active = true; $this->lat = $property->getLat(); $this->lng = $property->getLng(); $this->map_zoom = $property->getMapZoom(); $this->map_center_lat = $property->getMapCenterLat(); $this->map_center_lng = $property->getMapCenterLng(); }