| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306 |
- <?php
- namespace AppBundle\Entity\AccessWish;
- use AppBundle\Annotation\DefaultField;
- use AppBundle\Annotation\ExportSplitFields;
- use AppBundle\Entity\AccessAndFunction\Access;
- use AppBundle\Entity\Core\Country;
- use AppBundle\Entity\Core\File;
- use AppBundle\Entity\Core\Tagg;
- use AppBundle\Entity\Organization\Organization;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use DoctrineExtensions\Query\Mysql\Date;
- use Dunglas\ApiBundle\Annotation\Iri;
- use libphonenumber\PhoneNumberUtil;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- use Misd\PhoneNumberBundle\Validator\Constraints\PhoneNumber as AssertPhoneNumber;
- use AppBundle\Validator\Constraints as OpentalentAssert;
- /**
- * Access.
- *
- * @see http://schema.org/Access Documentation on Schema.org
- *
- * @Iri("http://schema.org/AccessWish")
- */
- #[ORM\Entity(repositoryClass: 'AppBundle\Entity\AccessWish\Repository\AccessWishRepository')]
- class AccessWish
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['accesswish', 'education_student_wish_list', 'online_registration_access_details', 'online_registration_access_family', 'online_registration_validation_access_family', 'online_registration_validation', 'accesswish_mail'])]
- private $id;
- /**
- * @var Organization
- *
- * @DefaultField
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['accesswish'])]
- private $organization;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessWishes', cascade: ['persist'])]
- #[ORM\JoinColumn(onDelete: 'CASCADE')]
- #[Groups(['accesswish', 'online_registration_access_family_accesswishes', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation'])]
- private $accessOriginal;
- /**
- * @var AccessFamilyWish
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessWish\AccessFamilyWish', inversedBy: 'accessWishes')]
- #[Groups(['accesswish_accessfamilywish', 'online_registration_access_family_accesswishes', 'online_registration_validation_access_family_accesswish', 'online_registration_validation_access_family_accesswishreregistrations', 'accesswish_mail', 'education_student_wish_list_accesswishreregistrations', 'education_student_wish_list_accesswish'])]
- private $accessFamilyWish;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\StatusEnum', 'toArray'], message: 'invalid-choice')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'accesswish_mail_accessfamilywish'])]
- private $status;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['accesswish', 'online_registration'])]
- private $isNewMemberFamily = false;
- /**
- * @var string
- *
- * @Iri("https://schema.org/givenName")
- */
- #[ORM\Column(type: 'string', length: 50, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 50, maxMessage: 'invalid-max-length')]
- #[Groups(['accesswish', 'online_registration', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation', 'education_student_wish_list_accesswishreregistrations'])]
- private $givenName;
- /**
- * @var string
- *
- * @Iri("https://schema.org/name")
- */
- #[ORM\Column(type: 'string', length: 100, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
- #[Groups(['accesswish', 'online_registration', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation', 'education_student_wish_list_accesswishreregistrations'])]
- private $name;
- /**
- * @var File
- *
- * @Iri("https://schema.org/image")
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $image;
- /**
- * @var \DateTime Date of birth.
- *
- * @Iri("https://schema.org/birthDate")
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date(message: 'invalid-date')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
- private $birthDate;
- /**
- * @var int
- */
- #[Groups(['template', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
- protected $ageTemplate;
- /**
- * @var string Gender of the person.
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Person\GenderEnum', 'toArray'], message: 'invalid-choice')]
- #[Groups(['accesswish', 'online_registration', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation'])]
- private $genderEnum;
- /**
- * @var string Email address.
- *
- * @Iri("https://schema.org/email")
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Assert\Email(strict: true, message: 'invalid-email-format')]
- #[Assert\Email(checkMX: true, message: 'invalid-email-domain')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'accesswish_mail', 'accesswish_mail_accessfamilywish', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
- private $email;
- /**
- * @var string
- *
- * @AssertPhoneNumber
- */
- #[ORM\Column(type: 'phone_number', nullable: true)]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
- private $telphone;
- /**
- * @var string
- *
- * @AssertPhoneNumber
- */
- #[ORM\Column(type: 'phone_number', nullable: true)]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
- private $mobilPhone;
- /**
- * @var Country
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\Country')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $addressCountry;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 100, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $addressCity;
- /**
- * @var string
- *
- * @OpentalentAssert\PostalCode
- */
- #[ORM\Column(type: 'string', length: 20, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $postalCode;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $streetAddress;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $streetAddressSecond;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $streetAddressThird;
- /**
- * @var ArrayCollection<EducationStudentWish>
- */
- #[Assert\Valid]
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\EducationStudentWish', mappedBy: 'accessWish', cascade: ['persist'], orphanRemoval: true)]
- #[Groups(['accesswish_educationstudentwish', 'online_registration', 'online_registration_validation'])]
- private $educationStudentWishes;
- /**
- * @var ArrayCollection<EducationStudentWish>
- */
- #[Assert\Valid]
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\EducationStudentWish', mappedBy: 'accessWishReregistrations', cascade: ['persist'], orphanRemoval: true)]
- #[Groups(['accesswish_educationstudentwish', 'online_registration', 'online_registration_validation'])]
- private $educationStudentReregistrationsWishes;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $profession;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => true])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $imageRight = true;
- /**
- * @var string
- */
- #[ORM\Column(type: 'text', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $medicalComments;
- /**
- * @var string
- */
- #[ORM\Column(type: 'text', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $notes;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $establishmentName;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $cityName;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $disponibility;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $className;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $teacherName;
- /**
- * @var ArrayCollection<EducationStudentWish>
- */
- #[Assert\Valid]
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\DocumentWish', mappedBy: 'accessWish', cascade: ['persist'])]
- #[Groups(['accesswish_documentwish', 'online_registration', 'online_registration_validation'])]
- private $documentWishes;
- /**
- * @var string
- *
- * @ExportSplitFields({"name","givenName"})
- */
- #[Groups(['accesswish'])]
- private $fullNameTemplate;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => true])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- private $synchro = false;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $approveRulesProcedureWish = false;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $receiveInformationsFromOrganizationWish = false;
- /**
- * @var ArrayCollection<Tagg>
- */
- #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'accessWishes')]
- #[Assert\Valid]
- #[ORM\JoinTable(name: 'tag_accessWish', joinColumns: [], inverseJoinColumns: [])]
- #[ORM\JoinColumn(name: 'accessWish_id', referencedColumnName: 'id')]
- #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
- #[Groups(['accesswish_tags', 'manage_tags'])]
- private $tags;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', options: ['default' => 'OPEN'])]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\ValidationStateEnum', 'toArray'], message: 'invalid-choice')]
- #[Groups(['accesswish', 'online_registration_validation'])]
- private $validationState = "OPEN";
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
- private $isValidated = false;
- /**
- * @var string
- * @ExportSplitFields({"gender","name","givenName","email","telphone","mobilPhone","addressCity","postalCode","streetAddress"})
- */
- #[Groups(['education_student_wish_list_accesswishreregistrations', 'education_student_wish_list_accesswish'])]
- private $fullNameAndContactTemplate;
- public function __construct()
- {
- $this->educationStudentWishes = new ArrayCollection();
- $this->educationStudentReregistrationsWishes = new ArrayCollection();
- $this->documentWishes = new ArrayCollection();
- $this->tags = new ArrayCollection();
- }
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set organization
- *
- * @param \AppBundle\Entity\Organization\Organization $organization
- *
- * @return AccessWish
- */
- public function setOrganization(\AppBundle\Entity\Organization\Organization $organization)
- {
- $this->organization = $organization;
- return $this;
- }
- /**
- * Get organization
- *
- * @return \AppBundle\Entity\Organization\Organization
- */
- public function getOrganization()
- {
- return $this->organization;
- }
- /**
- * Set givenName
- *
- * @param string $givenName
- *
- * @return AccessWish
- */
- public function setGivenName($givenName)
- {
- $this->givenName = $givenName;
- return $this;
- }
- /**
- * Get givenName
- *
- * @return string
- */
- public function getGivenName()
- {
- return $this->givenName;
- }
- /**
- * Sets name.
- *
- * @param string $name
- *
- * @return $this
- */
- public function setName($name)
- {
- $this->name = strtoupper($name);
- return $this;
- }
- /**
- * Get name
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Set birthDate
- *
- * @param \DateTime $birthDate
- *
- * @return AccessWish
- */
- public function setBirthDate($birthDate)
- {
- $this->birthDate = $birthDate;
- return $this;
- }
- /**
- * Get birthDate
- *
- * @return \DateTime
- */
- public function getBirthDate()
- {
- return $this->birthDate ? $this->birthDate->format('Y-m-d') : $this->birthDate;
- }
- /**
- * Set genderEnum
- *
- * @param string $genderEnum
- *
- * @return AccessWish
- */
- public function setGenderEnum($genderEnum)
- {
- $this->genderEnum = $genderEnum;
- return $this;
- }
- /**
- * Get genderEnum
- *
- * @return string
- */
- public function getGenderEnum()
- {
- return $this->genderEnum;
- }
- /**
- * Set email
- *
- * @param string $email
- *
- * @return AccessWish
- */
- public function setEmail($email)
- {
- $this->email = $email;
- return $this;
- }
- /**
- * Get email
- *
- * @return string
- */
- public function getEmail()
- {
- return $this->email;
- }
- /**
- * Sets telphone.
- *
- * @param string $telphone
- *
- * @return $this
- */
- public function setTelphone($telphone)
- {
- if(empty($telphone))$telphone = null;
- if(is_null($telphone)) $this->telphone = $telphone;
- else{
- $phoneUtil = PhoneNumberUtil::getInstance();
- $phoneNumber = $phoneUtil->parse($telphone, PhoneNumberUtil::UNKNOWN_REGION);
- $this->telphone = $phoneNumber;
- }
- return $this;
- }
- public function setPhoneNumberTelphone($phoneNumberTelphone)
- {
- $this->telphone = $phoneNumberTelphone;
- }
- /**
- * Get telphone
- *
- * @return phone_number
- */
- public function getTelphone()
- {
- return $this->telphone;
- }
- /**
- * Sets mobilPhone.
- *
- * @param string $mobilPhone
- *
- * @return $this
- */
- public function setMobilPhone($mobilPhone)
- {
- if(empty($mobilPhone))$mobilPhone = null;
- if(is_null($mobilPhone)) $this->mobilPhone = $mobilPhone;
- else{
- $phoneUtil = PhoneNumberUtil::getInstance();
- $phoneNumber = $phoneUtil->parse($mobilPhone, PhoneNumberUtil::UNKNOWN_REGION);
- $this->mobilPhone = $phoneNumber;
- }
- return $this;
- }
- public function setPhoneNumberMobilPhone($phoneNumberMobilPhone){
- $this->mobilPhone = $phoneNumberMobilPhone;
- }
- /**
- * Get mobilPhone
- *
- * @return phone_number
- */
- public function getMobilPhone()
- {
- return $this->mobilPhone;
- }
- /**
- * Set addressCity
- *
- * @param string $addressCity
- *
- * @return AccessWish
- */
- public function setAddressCity($addressCity)
- {
- $this->addressCity = $addressCity;
- return $this;
- }
- /**
- * Get addressCity
- *
- * @return string
- */
- public function getAddressCity()
- {
- return $this->addressCity;
- }
- /**
- * Set postalCode
- *
- * @param string $postalCode
- *
- * @return AccessWish
- */
- public function setPostalCode($postalCode)
- {
- $this->postalCode = $postalCode;
- return $this;
- }
- /**
- * Get postalCode
- *
- * @return string
- */
- public function getPostalCode()
- {
- return $this->postalCode;
- }
- /**
- * Set streetAddress
- *
- * @param string $streetAddress
- *
- * @return AccessWish
- */
- public function setStreetAddress($streetAddress)
- {
- $this->streetAddress = $streetAddress;
- return $this;
- }
- /**
- * Get streetAddress
- *
- * @return string
- */
- public function getStreetAddress()
- {
- return $this->streetAddress;
- }
- /**
- * Set streetAddressSecond
- *
- * @param string $streetAddressSecond
- *
- * @return AccessWish
- */
- public function setStreetAddressSecond($streetAddressSecond)
- {
- $this->streetAddressSecond = $streetAddressSecond;
- return $this;
- }
- /**
- * Get streetAddressSecond
- *
- * @return string
- */
- public function getStreetAddressSecond()
- {
- return $this->streetAddressSecond;
- }
- /**
- * Set streetAddressThird
- *
- * @param string $streetAddressThird
- *
- * @return AccessWish
- */
- public function setStreetAddressThird($streetAddressThird)
- {
- $this->streetAddressThird = $streetAddressThird;
- return $this;
- }
- /**
- * Get streetAddressThird
- *
- * @return string
- */
- public function getStreetAddressThird()
- {
- return $this->streetAddressThird;
- }
- /**
- * Set image
- *
- * @param \AppBundle\Entity\Core\File $image
- *
- * @return AccessWish
- */
- public function setImage(\AppBundle\Entity\Core\File $image = null)
- {
- $this->image = $image;
- return $this;
- }
- /**
- * Get image
- *
- * @return \AppBundle\Entity\Core\File
- */
- public function getImage()
- {
- return $this->image;
- }
- /**
- * Set addressCountry
- *
- * @param \AppBundle\Entity\Core\Country $addressCountry
- *
- * @return AccessWish
- */
- public function setAddressCountry(\AppBundle\Entity\Core\Country $addressCountry = null)
- {
- $this->addressCountry = $addressCountry;
- return $this;
- }
- /**
- * Get addressCountry
- *
- * @return \AppBundle\Entity\AccessWish\Country
- */
- public function getAddressCountry()
- {
- return $this->addressCountry;
- }
- /**
- * Add educationStudentWish
- *
- * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish
- *
- * @return AccessWish
- */
- public function addEducationStudentWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish)
- {
- $educationStudentWish->setAccessWish($this);
- $this->educationStudentWishes[] = $educationStudentWish;
- return $this;
- }
- /**
- * Remove educationStudentWish
- *
- * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish
- */
- public function removeEducationStudentWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish)
- {
- $this->educationStudentWishes->removeElement($educationStudentWish);
- }
- /**
- * Get educationStudentWishes
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getEducationStudentWishes()
- {
- return $this->educationStudentWishes;
- }
- /**
- * Set imageRight
- *
- * @param boolean $imageRight
- *
- * @return AccessWish
- */
- public function setImageRight($imageRight)
- {
- $this->imageRight = $imageRight;
- return $this;
- }
- /**
- * Get imageRight
- *
- * @return boolean
- */
- public function getImageRight()
- {
- return $this->imageRight;
- }
- /**
- * Set medicalComments
- *
- * @param string $medicalComments
- *
- * @return AccessWish
- */
- public function setMedicalComments($medicalComments)
- {
- $this->medicalComments = $medicalComments;
- return $this;
- }
- /**
- * Get medicalComments
- *
- * @return string
- */
- public function getMedicalComments()
- {
- return $this->medicalComments;
- }
- /**
- * Set notes
- *
- * @param string $notes
- *
- * @return AccessWish
- */
- public function setNotes($notes)
- {
- $this->notes = $notes;
- return $this;
- }
- /**
- * Get notes
- *
- * @return string
- */
- public function getNotes()
- {
- return $this->notes;
- }
- /**
- * Set profession
- *
- * @param string $profession
- *
- * @return AccessWish
- */
- public function setProfession($profession)
- {
- $this->profession = $profession;
- return $this;
- }
- /**
- * Get profession
- *
- * @return string
- */
- public function getProfession()
- {
- return $this->profession;
- }
- /**
- * Set establishmentName
- *
- * @param string $establishmentName
- *
- * @return AccessWish
- */
- public function setEstablishmentName($establishmentName)
- {
- $this->establishmentName = $establishmentName;
- return $this;
- }
- /**
- * Get establishmentName
- *
- * @return string
- */
- public function getEstablishmentName()
- {
- return $this->establishmentName;
- }
- /**
- * Set cityName
- *
- * @param string $cityName
- *
- * @return AccessWish
- */
- public function setCityName($cityName)
- {
- $this->cityName = $cityName;
- return $this;
- }
- /**
- * Get cityName
- *
- * @return string
- */
- public function getCityName()
- {
- return $this->cityName;
- }
- /**
- * Set disponibility
- *
- * @param string $disponibility
- *
- * @return AccessWish
- */
- public function setDisponibility($disponibility)
- {
- $this->disponibility = $disponibility;
- return $this;
- }
- /**
- * Get disponibility
- *
- * @return string
- */
- public function getDisponibility()
- {
- return $this->disponibility;
- }
- /**
- * Set className
- *
- * @param string $className
- *
- * @return AccessWish
- */
- public function setClassName($className)
- {
- $this->className = $className;
- return $this;
- }
- /**
- * Get className
- *
- * @return string
- */
- public function getClassName()
- {
- return $this->className;
- }
- /**
- * Set teacherName
- *
- * @param string $teacherName
- *
- * @return AccessWish
- */
- public function setTeacherName($teacherName)
- {
- $this->teacherName = $teacherName;
- return $this;
- }
- /**
- * Get teacher
- *
- * @return string
- */
- public function getTeacherName()
- {
- return $this->teacherName;
- }
- /**
- * Add documentWish
- *
- * @param \AppBundle\Entity\AccessWish\DocumentWish $documentWish
- *
- * @return AccessWish
- */
- public function addDocumentWish(\AppBundle\Entity\AccessWish\DocumentWish $documentWish)
- {
- $documentWish->setAccessWish($this);
- $this->documentWishes[] = $documentWish;
- return $this;
- }
- /**
- * Remove documentWish
- *
- * @param \AppBundle\Entity\AccessWish\DocumentWish $documentWish
- */
- public function removeDocumentWish(\AppBundle\Entity\AccessWish\DocumentWish $documentWish)
- {
- $this->documentWishes->removeElement($documentWish);
- }
- /**
- * Get documentWishes
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getDocumentWishes()
- {
- return $this->documentWishes;
- }
- /**
- * Gets full name.
- *
- * @return string
- */
- public function getFullNameTemplate()
- {
- return $this->getName() . ' ' . $this->getGivenName();
- }
- /**
- * Set accessOriginal
- *
- * @param \AppBundle\Entity\AccessAndFunction\Access $accessOriginal
- *
- * @return AccessWish
- */
- public function setAccessOriginal(\AppBundle\Entity\AccessAndFunction\Access $accessOriginal = null)
- {
- $this->accessOriginal = $accessOriginal;
- return $this;
- }
- /**
- * Get accessOriginal
- *
- * @return \AppBundle\Entity\AccessAndFunction\Access
- */
- public function getAccessOriginal()
- {
- return $this->accessOriginal;
- }
- /**
- * Set accessFamilyWish
- *
- * @param \AppBundle\Entity\AccessWish\AccessFamilyWish $accessFamilyWish
- *
- * @return AccessWish
- */
- public function setAccessFamilyWish(\AppBundle\Entity\AccessWish\AccessFamilyWish $accessFamilyWish = null)
- {
- $this->accessFamilyWish = $accessFamilyWish;
- return $this;
- }
- /**
- * Get accessFamilyWish
- *
- * @return \AppBundle\Entity\AccessWish\AccessFamilyWish
- */
- public function getAccessFamilyWish()
- {
- return $this->accessFamilyWish;
- }
- /**
- * Set status
- *
- * @param string $status
- *
- * @return AccessWish
- */
- public function setStatus($status)
- {
- $this->status = $status;
- return $this;
- }
- /**
- * Get status
- *
- * @return string
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * Add educationStudentReregistrationsWish
- *
- * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish
- *
- * @return AccessWish
- */
- public function addEducationStudentReregistrationsWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish)
- {
- $educationStudentReregistrationsWish->setAccessWishReregistrations($this);
- $this->educationStudentReregistrationsWishes[] = $educationStudentReregistrationsWish;
- return $this;
- }
- /**
- * Remove educationStudentReregistrationsWish
- *
- * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish
- */
- public function removeEducationStudentReregistrationsWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish)
- {
- $this->educationStudentReregistrationsWishes->removeElement($educationStudentReregistrationsWish);
- }
- /**
- * Get educationStudentReregistrationsWishes
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getEducationStudentReregistrationsWishes()
- {
- return $this->educationStudentReregistrationsWishes;
- }
- /**
- * Set synchro
- *
- * @param boolean $synchro
- *
- * @return AccessWish
- */
- public function setSynchro($synchro)
- {
- $this->synchro = $synchro;
- return $this;
- }
- /**
- * Get synchro
- *
- * @return boolean
- */
- public function getSynchro()
- {
- return $this->synchro;
- }
- /**
- * Set approveRulesProcedureWish
- *
- * @param boolean $approveRulesProcedureWish
- *
- * @return AccessWish
- */
- public function setApproveRulesProcedureWish($approveRulesProcedureWish)
- {
- $this->approveRulesProcedureWish = $approveRulesProcedureWish;
- return $this;
- }
- /**
- * Get approveRulesProcedureWish
- *
- * @return boolean
- */
- public function getApproveRulesProcedureWish()
- {
- return $this->approveRulesProcedureWish;
- }
- /**
- * Set receiveInformationsFromOrganizationWish
- *
- * @param boolean $receiveInformationsFromOrganizationWish
- *
- * @return AccessWish
- */
- public function setReceiveInformationsFromOrganizationWish($receiveInformationsFromOrganizationWish)
- {
- $this->receiveInformationsFromOrganizationWish = $receiveInformationsFromOrganizationWish;
- return $this;
- }
- /**
- * Get receiveInformationsFromOrganizationWish
- *
- * @return boolean
- */
- public function getReceiveInformationsFromOrganizationWish()
- {
- return $this->receiveInformationsFromOrganizationWish;
- }
- /**
- * Set isNewMemberFamily
- *
- * @param boolean $isNewMemberFamily
- *
- * @return AccessWish
- */
- public function setIsNewMemberFamily($isNewMemberFamily)
- {
- $this->isNewMemberFamily = $isNewMemberFamily;
- return $this;
- }
- /**
- * Get isNewMemberFamily
- *
- * @return boolean
- */
- public function getIsNewMemberFamily()
- {
- return $this->isNewMemberFamily;
- }
- /**
- * Add tag
- *
- * @param \AppBundle\Entity\Core\Tagg $tag
- *
- * @return AccessWish
- */
- public function addTag(\AppBundle\Entity\Core\Tagg $tag)
- {
- $this->tags[] = $tag;
- return $this;
- }
- /**
- * Remove tag
- *
- * @param \AppBundle\Entity\Core\Tagg $tag
- */
- public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
- {
- $this->tags->removeElement($tag);
- }
- /**
- * Get tags
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getTags()
- {
- return $this->tags;
- }
- public function getAgeTemplate()
- {
- $from = new \DateTime($this->getBirthDate());
- $to = new \DateTime('today');
- $age = $from->diff($to)->y;
- return $age > 0 ? $age : null;
- }
- /**
- * Gets full name.
- *
- * @return array
- */
- public function getFullNameAndContactTemplate()
- {
- if(!empty($this->getGenderEnum())){
- $fullNameAndContactTemplate[] = [ 'value' => $this->getGenderEnum(), 'translate' => true ];
- $fullNameAndContactTemplate[] = ' - ';
- }
- $fullNameAndContactTemplate[] = $this->getFullNameTemplate();
- if(!empty($this->getEmail()) || !empty($this->getTelphone()) || !empty($this->getMobilPhone())){
- $fullNameAndContactTemplate[] = ' - ';
- if(!empty($this->getEmail()))
- $fullNameAndContactTemplate[] = $this->getEmail();
- if(!empty($this->getTelphone()))
- $fullNameAndContactTemplate[] = ['type' => 'phone_number', 'value' => $this->getTelphone(), 'separator' => ' / '];
- if(!empty($this->getMobilPhone()))
- $fullNameAndContactTemplate[] = ['type' => 'phone_number', 'value' => $this->getMobilPhone(), 'separator' => ' / '];
- }
- if(!empty($this->getStreetAddress()) || !empty($this->getCityName())){
- $fullNameAndContactTemplate[] = ' - ';
- if(!empty($this->getStreetAddress()))
- $fullNameAndContactTemplate[] = $this->getStreetAddress();
- if(!empty($this->getPostalCode()))
- $fullNameAndContactTemplate[] = $this->getPostalCode();
- if(!empty($this->getCityName()))
- $fullNameAndContactTemplate[] = $this->getCityName();
- }
- return $fullNameAndContactTemplate;
- }
- /**
- * Set validationState
- *
- * @param string $validationState
- *
- * @return AccessWish
- */
- public function setValidationState($validationState)
- {
- $this->validationState = $validationState;
- return $this;
- }
- /**
- * Get validationState
- *
- * @return string
- */
- public function getValidationState()
- {
- return $this->validationState;
- }
- /**
- * Set isValidated
- *
- * @param boolean $isValidated
- *
- * @return AccessWish
- */
- public function setIsValidated($isValidated)
- {
- $this->isValidated = $isValidated;
- return $this;
- }
- /**
- * Get isValidated
- *
- * @return boolean
- */
- public function getIsValidated()
- {
- return $this->isValidated;
- }
- }
|