/src/Nexity/ContactBundle/Entity/BaseContact.php
PHP | 826 lines | 312 code | 123 blank | 391 comment | 0 complexity | 1900813af4a8d4f123b2bace2808b500 MD5 | raw file
Possible License(s): Apache-2.0
- <?php
- /**
- * This file is part of the nexitysf2 package.
- *
- * (c) Mike Plavonil
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Nexity\ContactBundle\Entity;
- abstract class BaseContact
- {
- const CIVILITE_MR = 'M.';
- const CIVILITE_MME = 'Mme';
- const CIVILITE_MLLE = 'Mlle';
- const SOURCE_SITE = 'site';
- const SOURCE_MOBILE = 'mobile';
- const SOURCE_APPLI = 'appli';
- /**
- * Contact id.
- *
- * @var integer
- */
- protected $id;
- /**
- * Contact civilite
- *
- * @var integer
- */
- protected $civilite;
- /**
- * Contact $nom.
- *
- * @var string
- */
- protected $nom;
- /**
- * Contact prenom.
- *
- * @var string
- */
- protected $prenom;
- /**
- * @var string
- */
- protected $adresse;
- /**
- * @var string
- */
- protected $codePostal;
- /**
- * @var string
- */
- protected $ville;
- /**
- * @var string
- */
- protected $telephone;
- /**
- * @var string
- */
- protected $email;
-
- /**
- * @var string
- */
- protected $entreprise;
-
- /**
- * @var string
- */
- protected $optinNexity;
- /**
- * @var string
- */
- protected $optinPartenaire;
- /**
- * @var FormulaireSite
- */
- protected $typeFormulaire;
- /**
- * @var string
- */
- protected $bien;
- /**
- * @var string
- */
- protected $bienCodePostal;
- /**
- * @var string
- */
- protected $typeCommercialisation;
- /**
- * @var string
- */
- protected $agence;
- /**
- * @var string
- */
- protected $formId;
- /**
- * @var string
- */
- protected $source;
- /**
- * @var string
- */
- protected $destinataire;
- /**
- * @var string
- */
- protected $objetMailCc;
- /**
- * @var string
- */
- protected $datePostForm;
- /**
- * @var integer
- */
- protected $priorite;
- /**
- * @var string
- */
- protected $message;
- /**
- * @var string
- */
- protected $pays;
- /**
- * @var string
- */
- protected $codePostalSip;
- /**
- * @var string
- */
- protected $clientNexity;
- /**
- * Constructor.
- */
- public function __construct()
- {
- $this->civilite = self::CIVILITE_MR;
- $this->source = self::SOURCE_SITE;
- $this->datePostForm = new \DateTime();
- $this->typeFormulaire = new FormulaireSite();
- }
- public static function getCiviliteList()
- {
- return [
- self::CIVILITE_MR => self::CIVILITE_MR,
- self::CIVILITE_MME => self::CIVILITE_MME,
- self::CIVILITE_MLLE => self::CIVILITE_MLLE,
- ];
- }
- public static function getCiviliteValues()
- {
- return array_keys(self::getCiviliteList());
- }
- public function getCiviliteName()
- {
- $list = [
- self::CIVILITE_MLLE => 'Mademoiselle',
- self::CIVILITE_MME => 'Madame',
- self::CIVILITE_MR => 'Monsieur',
- ];
- return !empty($list[$this->getCivilite()])?$list[$this->getCivilite()]:'';
- }
- /**
- * Get bien
- *
- * @return string
- */
- public function getBien()
- {
- return $this->bien;
- }
- /**
- * Set bien
- *
- * @param string $bien
- * @return Contact
- */
- public function setBien($bien)
- {
- $this->bien = $bien;
- return $this;
- }
- /**
- * Set civilite
- *
- * @param integer $civilite
- * @return Contact
- */
- public function setCivilite($civilite)
- {
- $this->civilite = $civilite;
- return $this;
- }
- /**
- * Get civilite
- *
- * @return integer
- */
- public function getCivilite()
- {
- return $this->civilite;
- }
- /**
- * Set nom
- *
- * @param string $nom
- * @return Contact
- */
- public function setNom($nom)
- {
- $this->nom = $nom;
- return $this;
- }
- /**
- * Get nom
- *
- * @return string
- */
- public function getNom()
- {
- return $this->nom;
- }
- /**
- * Set prenom
- *
- * @param string $prenom
- * @return Contact
- */
- public function setPrenom($prenom)
- {
- $this->prenom = $prenom;
- return $this;
- }
- /**
- * Get prenom
- *
- * @return string
- */
- public function getPrenom()
- {
- return $this->prenom;
- }
- /**
- * Set adresse
- *
- * @param string $adresse
- * @return Contact
- */
- public function setAdresse($adresse)
- {
- $this->adresse = $adresse;
- return $this;
- }
- /**
- * Get adresse
- *
- * @return string
- */
- public function getAdresse()
- {
- return $this->adresse;
- }
- /**
- * Set codePostal
- *
- * @param string $codePostal
- * @return Contact
- */
- public function setCodePostal($codePostal)
- {
- $this->codePostal = $codePostal;
- return $this;
- }
- /**
- * Get codePostal
- *
- * @return string
- */
- public function getCodePostal()
- {
- return $this->codePostal;
- }
- /**
- * Set ville
- *
- * @param string $ville
- * @return Contact
- */
- public function setVille($ville)
- {
- $this->ville = $ville;
- return $this;
- }
- /**
- * Get ville
- *
- * @return string
- */
- public function getVille()
- {
- return $this->ville;
- }
- /**
- * Set telephone
- *
- * @param string $telephone
- * @return Contact
- */
- public function setTelephone($telephone)
- {
- $this->telephone = $telephone;
- return $this;
- }
- /**
- * Get telephone
- *
- * @return string
- */
- public function getTelephone()
- {
- return $this->telephone;
- }
- /**
- * Set email
- *
- * @param string $email
- * @return Contact
- */
- public function setEmail($email)
- {
- $this->email = $email;
- return $this;
- }
- /**
- * Get email
- *
- * @return string
- */
- public function getEmail()
- {
- return $this->email;
- }
- /**
- * Set entreprise
- *
- * @param string $entreprise
- * @return Contact
- */
- public function setEntreprise($entreprise)
- {
- $this->entreprise = $entreprise;
- return $this;
- }
- /**
- * Get entreprise
- *
- * @return string
- */
- public function getEntreprise()
- {
- return $this->entreprise;
- }
-
-
-
- /**
- * Set optinNexity
- *
- * @param integer $optinNexity
- * @return Contact
- */
- public function setOptinNexity($optinNexity)
- {
- $this->optinNexity = $optinNexity;
- return $this;
- }
- /**
- * Get optinNexity
- *
- * @return integer
- */
- public function getOptinNexity()
- {
- return $this->optinNexity;
- }
- /**
- * Set optinPartenaire
- *
- * @param integer $optinPartenaire
- * @return Contact
- */
- public function setOptinPartenaire($optinPartenaire)
- {
- $this->optinPartenaire = $optinPartenaire;
- return $this;
- }
- /**
- * Get optinPartenaire
- *
- * @return integer
- */
- public function getOptinPartenaire()
- {
- return $this->optinPartenaire;
- }
- /**
- * Set typeFormulaire
- *
- * @param FormulaireSite $typeFormulaire
- * @return Contact
- */
- public function setTypeFormulaire(FormulaireSite $typeFormulaire)
- {
- $this->typeFormulaire = $typeFormulaire;
- return $this;
- }
- /**
- * Get typeFormulaire
- *
- * @return string
- */
- public function getTypeFormulaire()
- {
- return $this->typeFormulaire;
- }
- /**
- * Set bienCodePostal
- *
- * @param string $bienCodePostal
- * @return Contact
- */
- public function setBienCodePostal($bienCodePostal)
- {
- $this->bienCodePostal = $bienCodePostal;
- return $this;
- }
- /**
- * Get bienCodePostal
- *
- * @return string
- */
- public function getBienCodePostal()
- {
- return $this->bienCodePostal;
- }
- /**
- * Set typeCommercialisation
- *
- * @param string $typeCommercialisation
- * @return Contact
- */
- public function setTypeCommercialisation($typeCommercialisation)
- {
- $this->typeCommercialisation = $typeCommercialisation;
- return $this;
- }
- /**
- * Get typeCommercialisation
- *
- * @return string
- */
- public function getTypeCommercialisation()
- {
- return $this->typeCommercialisation;
- }
- /**
- * Set agence
- *
- * @param string $agence
- * @return Contact
- */
- public function setAgence($agence)
- {
- $this->agence = $agence;
- return $this;
- }
- /**
- * Get agence
- *
- * @return string
- */
- public function getAgence()
- {
- return $this->agence;
- }
- /**
- * Set formId
- *
- * @param integer $formId
- * @return Contact
- */
- public function setFormId($formId)
- {
- $this->formId = $formId;
- return $this;
- }
- /**
- * Get formId
- *
- * @return integer
- */
- public function getFormId()
- {
- return $this->formId;
- }
- /**
- * Set source
- *
- * @param string $source
- * @return Contact
- */
- public function setSource($source)
- {
- $this->source = $source;
- return $this;
- }
- /**
- * Get source
- *
- * @return string
- */
- public function getSource()
- {
- return $this->source;
- }
- /**
- * Set destinataire
- *
- * @param string $destinataire
- * @return Contact
- */
- public function setDestinataire($destinataire)
- {
- $this->destinataire = $destinataire;
- return $this;
- }
- /**
- * Get destinataire
- *
- * @return string
- */
- public function getDestinataire()
- {
- return $this->destinataire;
- }
- /**
- * Set objetMailCc
- *
- * @param string $objetMailCc
- * @return Contact
- */
- public function setObjetMailCc($objetMailCc)
- {
- $this->objetMailCc = $objetMailCc;
- return $this;
- }
- /**
- * Get objetMailCc
- *
- * @return string
- */
- public function getObjetMailCc()
- {
- return $this->objetMailCc;
- }
- /**
- * Set datePostForm
- *
- * @param string $datePostForm
- * @return Contact
- */
- public function setDatePostForm($datePostForm)
- {
- $this->datePostForm = $datePostForm;
- return $this;
- }
- /**
- * Get datePostForm
- *
- * @return string
- */
- public function getDatePostForm()
- {
- return $this->datePostForm;
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * @param integer $priorite
- * @return Contact
- */
- public function setPriorite($priorite)
- {
- $this->priorite = $priorite;
- return $this;
- }
- /**
- * Get priorite
- *
- * @return integer
- */
- public function getPriorite()
- {
- return $this->priorite;
- }
- /**
- * @param $message
- * @return $this
- */
- public function setMessage($message)
- {
- $this->message = $message;
- return $this;
- }
- /**
- * @return string
- */
- public function getMessage()
- {
- return $this->message;
- }
- /**
- * @return string
- */
- public function getFullname()
- {
- return $this->nom .' '. $this->prenom;
- }
- /**
- * @return string
- */
- public function getFullAdresse()
- {
- return $this->codePostal .' '. strtoupper($this->ville);
- }
- /**
- * Set pays
- *
- * @param string $pays
- * @return Contact
- */
- public function setPays($pays)
- {
- $this->pays = $pays;
- return $this;
- }
- /**
- * Get pays
- *
- * @return string
- */
- public function getPays()
- {
- return $this->pays;
- }
- /**
- * Set codePostalSip
- *
- * @param string $codePostalSip
- * @return Contact
- */
- public function setCodePostalSip($codePostalSip)
- {
- $this->codePostalSip = $codePostalSip;
- return $this;
- }
- /**
- * Get codePostalSip
- *
- * @return string
- */
- public function getCodePostalSip()
- {
- return $this->codePostalSip;
- }
- /**
- * Set clientNexity
- *
- * @param integer $clientNexity
- * @return Contact
- */
- public function setClientNexity($clientNexity)
- {
- $this->clientNexity = $clientNexity;
- return $this;
- }
- /**
- * Get clientNexity
- *
- * @return integer
- */
- public function getClientNexity()
- {
- return $this->clientNexity;
- }
- }