numbers = new ArrayCollection(); $this->sessions = new ArrayCollection(); $this->vehicles = new ArrayCollection(); $this->job_orders = new ArrayCollection(); $this->customer_tags = new ArrayCollection(); $this->customer_classification = CustomerClassification::REGULAR; $this->customer_notes = ''; $this->title = ''; $this->flag_confirmed = false; $this->flag_mobile_app = false; $this->flag_active = true; $this->phone_mobile = ''; $this->phone_landline = ''; $this->phone_office = ''; $this->phone_fax = ''; $this->email = ''; $this->priv_third_party = 0; $this->priv_promo = 0; $this->flag_csat = false; $this->flag_promo_email = false; $this->flag_promo_sms = false; $this->flag_dpa_consent = false; $this->flag_research_sms = false; $this->flag_research_email = false; $this->date_create = new DateTime(); $this->create_source = 'unknown'; } public function getID() { return $this->id; } public function setTitle($title) { $this->title = $title; return $this; } public function getTitle() { return $this->title; } public function setFirstName($first_name) { $this->first_name = $first_name; return $this; } public function getFirstName() { return $this->first_name; } public function setLastName($last_name) { $this->last_name = $last_name; return $this; } public function getLastName() { return $this->last_name; } public function getNameDisplay() { return $this->first_name . ' ' . $this->last_name; } public function setCustomerClassification($customer_classification) { $this->customer_classification = $customer_classification; return $this; } public function getCustomerClassification() { return $this->customer_classification; } public function setCustomerNotes($customer_notes) { $this->customer_notes = $customer_notes; return $this; } public function getCustomerNotes() { return $this->customer_notes; } public function getMobileNumberList() { $phones = []; if (!empty($this->phone_mobile)) $phones[] = $this->phone_mobile; if (!empty($this->phone_landline)) $phones[] = $this->phone_landline; if (!empty($this->phone_office)) $phones[] = $this->phone_office; if (!empty($this->phone_fax)) $phones[] = $this->phone_fax; return $phones; } public function setPhoneMobile($phone) { $this->phone_mobile = $phone; return $this; } public function getPhoneMobile() { return $this->phone_mobile; } public function setPhoneLandline($phone) { $this->phone_landline = $phone; return $this; } public function getPhoneLandline() { return $this->phone_landline; } public function setPhoneOffice($phone) { $this->phone_office = $phone; return $this; } public function getPhoneOffice() { return $this->phone_office; } public function setPhoneFax($phone) { $this->phone_fax = $phone; return $this; } public function getPhoneFax() { return $this->phone_fax; } public function getPlateNumberList() { $plate_numbers = []; foreach ($this->vehicles as $vehicle) $plate_numbers[] = $vehicle->getPlateNumber(); return $plate_numbers; } public function addMobileSession(MobileSession $session) { $this->sessions->add($session); return $this; } public function clearMobileSessions() { $this->sessions->clear(); return $this; } public function getMobileSessions() { return $this->sessions; } public function addVehicle(CustomerVehicle $vehicle) { $this->vehicles->add($vehicle); return $this; } public function clearVehicles() { $this->vehicles->clear(); return $this; } public function removeVehicle($vehicle) { $this->vehicles->removeElement($vehicle); return $this; } public function getVehicles() { return $this->vehicles; } public function setConfirmed($flag_confirmed = true) { $this->flag_confirmed = $flag_confirmed; return $this; } public function isConfirmed() { return $this->flag_confirmed; } public function setHasMobileApp($flag_mobile_app = true) { $this->flag_mobile_app = $flag_mobile_app; return $this; } public function hasMobileApp() { return $this->flag_mobile_app; } public function setActive($flag_active = true) { $this->flag_active = $flag_active; return $this; } public function isActive() { return $this->flag_active; } public function setIsCSAT($bool = true) { $this->flag_csat = $bool; return $this; } public function isCSAT() { return $this->flag_csat; } public function getJobOrders() { return $this->job_orders; } public function getTickets() { return $this->tickets; } public function setEmail($email) { $this->email = $email; return $this; } public function getEmail() { return $this->email; } public function setPrivacyThirdParty($bool = true) { $this->priv_third_party = $bool; return $this; } public function getPrivacyThirdParty() { return $this->priv_third_party; } public function setPrivacyPromo($bool = true) { $this->priv_promo = $bool; return $this; } public function getPrivacyPromo() { return $this->priv_promo; } public function setPrivacyPolicyMobile($privpol_mobile_app) { $this->privpol_mobile_app = $privpol_mobile_app; return $this; } public function getPrivacyPolicyMobile() { return $this->privpol_mobile_app; } public function setPrivacyPolicyThirdParty($privpol_third_party) { $this->privpol_third_party = $privpol_third_party; return $this; } public function getPrivacyPolicyThirdParty() { return $this->privpol_third_party; } public function setPrivacyPolicyPromo($privpol_promo) { $this->privpol_promo = $privpol_promo; return $this; } public function getPrivacyPolicyPromo() { return $this->privpol_promo; } public function setPromoEmail($flag_promo_email = true) { $this->flag_promo_email = $flag_promo_email; return $this; } public function isPromoEmail() { return $this->flag_promo_email; } public function setPromoSms($flag_promo_sms = true) { $this->flag_promo_sms = $flag_promo_sms; return $this; } public function isPromoSms() { return $this->flag_promo_sms; } public function setDpaConsent($flag_dpa_consent = true) { $this->flag_dpa_consent = $flag_dpa_consent; return $this; } public function isDpaConsent() { return $this->flag_dpa_consent; } public function setResearchSms($flag_research_sms = true) { $this->flag_research_sms = $flag_research_sms; return $this; } public function isResearchSms() { return $this->flag_research_sms; } public function setResearchEmail($flag_research_email = true) { $this->flag_research_email = $flag_research_email; return $this; } public function isResearchEmail() { return $this->flag_research_email; } public function setCreateSource($source) { $this->create_source = $source; return $this; } public function getCreateSource() { return $this->create_source; } public function addCustomerTag(CustomerTag $customer_tag) { $this->customer_tags[$customer_tag->getID()] = $customer_tag; return $this; } public function clearCustomerTags() { $this->customer_tags->clear(); return $this; } public function getCustomerTags() { $str_cust_tags = []; foreach ($this->customer_tags as $cust_tag) $str_cust_tags[] = $cust_tag->getID(); return $str_cust_tags; } public function getCustomerTagObjects() { return $this->customer_tags; } public function removeCustomerTag(CustomerTag $customer_tag) { $this->customer_tags->removeElement($customer_tag); $customer_tag->removeCustomer($this); } }