| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391 |
- <?php
- namespace AppBundle\Entity\Person;
- use AppBundle\Annotation\ExportSplitFields;
- use AppBundle\Entity\AccessAndFunction\Access;
- use AppBundle\Entity\AccessWish\DocumentWish;
- use AppBundle\Entity\Core\ContactPoint;
- use AppBundle\Entity\Core\File;
- use AppBundle\Enum\Core\AddressPostalTypeEnum;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Core\Country;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- use AppBundle\Entity\Bank\BankAccount;
- use FOS\UserBundle\Model\User as BaseUser;
- use AppBundle\Entity\Traits\AddressPostalType;
- use AppBundle\Annotation\Confidentiality;
- use AppBundle\Entity\Traits\ContactPointType;
- use AppBundle\Entity\Core\ContactInterface;
- /**
- * Personne physique ou morale
- *
- * @Iri("http://schema.org/Person")
- */
- #[ORM\Entity(repositoryClass: 'AppBundle\Entity\Person\Repository\PersonRepository')]
- class Person extends BaseUser implements ContactInterface
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- use AddressPostalType;
- use ContactPointType;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['person', 'access_details', 'access_mass', 'access_reference', 'all_accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'morals_list', 'ca_list', 'accesses_list', 'rule', 'access_details_billingpayers', 'equipment_list_supplier', 'equipment_list_access', 'equipmentrent_list_borrower', 'equipmentloan_list_borrower', 'equipmentcontrol_list_accompanist', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_provider', 'equipmentaccounting_list_supplier', 'equipmentmediatheque_list_supplier', 'equipmentcostume_list_access', 'message_list_author', 'messagesend_list_author', 'template_list_author', 'othercontact_list', 'commission_list_commissionmembers', 'attendancebooking_list_access', 'donor_list_access', 'examenconvocation_list_student', 'medal_list_access', 'viewaudit_list_createdby', 'viewaudit_list_updatedby', 'my_student_list_access', 'planning_list', 'report_card', 'student_registration', 'student_registration_accessfamily', 'access_informations_edit', 'access_informations_edit_familymembers', 'equipment_details_editor', 'accesses_list_guardians', 'student_list_courses', 'adherent_list_guardians', 'access_duplicate_control_list', 'own_access', 'own_student_access', 'accesscmfnetwork', 'board_list', 'licence_cmf', 'networkmanagers_list', 'my_access_put', 'adherent_contact', 'access_mail', 'accesses_rules', 'payer_list', 'equipmentmediatheque_list_access', 'sepa_debit_mandate', 'cotisation_responsibles_accesses', 'fusion_accesses', 'accessbilling_edit', 'view_from_manager_create', 'online_registration_access_details', 'access_files', 'accesses_no_reregistred_list', 'cmf_network_persons'])]
- protected $id;
- /**
- * @var string The username of the author.
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true, unique: true)]
- #[Groups(['person', 'access_details_person', 'organization_create_access', 'student_list_person', 'guardians_list_person', 'accesses_list_person', 'adherent_list_person', 'board_list_person', 'ca_list_person', 'othercontact_list_person', 'personnels_list_person', 'teachers_list_person', 'all_accesses_list_person', 'payer_list_person'])]
- protected $username;
- /**
- * @var string The username of the author.
- */
- #[ORM\Column(name: 'username_canonical', type: 'string', length: 255, nullable: true, unique: true)]
- protected $usernameCanonical;
- /**
- * @var string The email of the user.
- *
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Groups(['person'])]
- protected $email;
- /**
- * @var string The email of the user.
- */
- #[ORM\Column(name: 'email_canonical', type: 'string', length: 255, nullable: true)]
- protected $emailCanonical;
- /**
- * @var boolean
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Groups(['organization_create', 'all_accesses_list_person'])]
- protected $enabled = false;
- /**
- * The salt to use for hashing
- *
- * @var string
- */
- #[ORM\Column(type: 'string', options: ['default' => ''])]
- #[Groups(['organization_create'])]
- protected $salt;
- /**
- * Encrypted password. Must be persisted.
- *
- * @var string
- *
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Groups(['organization_create', 'organization_create_access'])]
- protected $password;
- /**
- * @var \DateTime
- */
- #[ORM\Column(name: 'last_login', type: 'datetime', nullable: true)]
- protected $lastLogin;
- /**
- * Random string sent to the user email address in order to verify it
- *
- * @var string
- */
- #[ORM\Column(name: 'confirmation_token', type: 'string', nullable: true)]
- #[Groups(['person'])]
- protected $confirmationToken;
- /**
- * @var \DateTime
- */
- #[ORM\Column(name: 'password_requested_at', type: 'datetime', nullable: true)]
- protected $passwordRequestedAt;
- /**
- * @var boolean
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- protected $locked = false;
- /**
- * @var boolean
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- protected $expired = false;
- /**
- * @var \DateTime
- */
- #[ORM\Column(name: 'expires_at', type: 'datetime', nullable: true)]
- public $expiresAt;
- /**
- * @var array
- */
- #[ORM\Column(type: 'array')]
- protected $roles;
- /**
- * @var boolean
- */
- #[ORM\Column(name: 'credentials_expired', type: 'boolean', options: ['default' => false])]
- protected $credentialsExpired = false;
- /**
- * @var \DateTime
- */
- #[ORM\Column(name: 'credentials_expire_at', type: 'datetime', nullable: true)]
- protected $credentialsExpireAt;
- /**
- * @var ArrayCollection<PersonAddressPostal>
- */
- #[Assert\Valid]
- #[Groups(['person_personaddresspostal', 'all_accesses_list_person', 'access_details_person', 'morals_list_person', 'report_card_person', 'report_card_guardians', 'access_details_guardians', 'student_registration_person', 'student_registration_guardians', 'accesses_list_person', 'student_list_person', 'education_student_next_year_access', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'othercontact_list_person', 'access_duplicate_control_list_person', 'board_list_person', 'networkmanagers_list_person', 'payer_list_person', 'sepa_debit_mandate_person', 'student_list_guardians', 'equipment_availability_form_borrower', 'view_from_manager_create_person', 'online_registration_access_details_person', 'build_bills_access'])]
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\PersonAddressPostal', mappedBy: 'person', orphanRemoval: true, cascade: ['persist'])]
- private $personAddressPostal;
- /**
- * @var ArrayCollection<PersonAddressPostal>
- */
- #[Groups(['template'])]
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\PersonAddressPostal', mappedBy: 'person', orphanRemoval: true, cascade: ['persist'], fetch: 'EXTRA_LAZY')]
- private $personAddressPostalPrincipal;
- #[Assert\Valid]
- #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\ContactPoint', cascade: ['persist'], orphanRemoval: true, inversedBy: 'person')]
- #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
- #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id')]
- #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id')]
- #[Groups(['all_accesses_list_person', 'person_contactpoint', 'access_details_person', 'access_details_guardians', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'morals_list_person', 'ca_list_person', 'accesses_list_person', 'othercontact_list_person', 'report_card_person', 'report_card_guardians', 'student_registration_person', 'student_registration_guardians', 'access_informations_edit_familymembers', 'board_list_person', 'networkmanagers_list_person', 'network_list_adminaccess', 'adherent_contact_person', 'adherent_contact_guardians', 'access_mail_person', 'student_list_guardians', 'access_mail_guardians', 'payer_list_person', 'access_duplicate_control_list_person', 'view_from_manager_create_person', 'online_registration_access_details_person', 'accesses_no_reregistred_list_person', 'accesses_no_reregistred_list_guardians'])]
- private $contactPoint;
- #[Assert\Valid]
- #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Bank\BankAccount', inversedBy: 'person', cascade: ['persist'], orphanRemoval: true)]
- #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
- #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id')]
- #[ORM\JoinColumn(name: 'bankAccount_id', referencedColumnName: 'id')]
- #[Groups(['person_bankaccount', 'access_details_person', 'sepa_debit_mandate_person', 'build_bills_access'])]
- private $bankAccount;
- /**
- * @var File An image of the item. This can be a [URL](http://schema.org/URL) or a fully described [ImageObject](http://schema.org/ImageObject).
- *
- * @Iri("https://schema.org/image")
- * @Confidentiality(visibility=\AppBundle\Enum\Confidentiality\ConfidentialityTypeEnum::VISIBILITY_ORGANIZATION)
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File', inversedBy: 'personImages')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['person', 'access_details_person', 'adherent_list_person', 'ca_list_person', 'student_registration_person', 'student_registration_guardians', 'student_registration_accessfamily', 'access_details_organization', 'access_informations_edit_person', 'accesses_list_person', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'morals_list_person', 'ca_list_person', 'othercontact_list_person', 'board_list_person', 'all_accesses_list_person', 'licence_cmf_person', 'networkmanagers_list_person', 'own_access_person', 'own_student_access_person', 'adherent_contact_person', 'access_details_children', 'online_registration_access_details_person'])]
- private $image;
- /**
- * @var \DateTime Date of birth.
- *
- * @Iri("https://schema.org/birthDate")
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date(message: 'invalid-date')]
- #[Groups(['person', 'access_details_person', 'student_list_person', 'rule_person', 'student_registration_person', 'student_registration_guardians', 'access_informations_edit_person', 'accesses_list_person', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'othercontact_list_person', 'own_access_person', 'own_student_access_person', 'board_list_person', 'access_duplicate_control_list_person', 'fusion_accesses_person', 'online_registration_access_details_person', 'education_student_next_year_access'])]
- private $birthDate;
- /**
- * @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(['person', 'access_details_person', 'adherent_list_person', 'ca_list_person', 'rule_person', 'accesses_list_person', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'othercontact_list_person', 'report_card_person', 'report_card_guardians', 'report_card_educationstudent', 'student_registration_person', 'student_registration_guardians', 'access_informations_edit_person', 'board_list_person', 'licence_cmf_person', 'networkmanagers_list_person', 'own_access_person', 'adherent_contact_person', 'accesses_rules_person', 'payer_list_person', 'access_duplicate_control_list_person', 'access_details_children', 'student_list_guardians', 'fusion_accesses_person', 'all_accesses_list_person', 'equipment_availability_form_borrower', 'education_student_next_year_access', 'online_registration_access_details_person', 'accesses_no_reregistred_list_person', 'build_bills_access'])]
- private $gender;
- /**
- * @var Country Nationality of the person.
- *
- * @Iri("https://schema.org/nationality")
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\Country')]
- #[Groups(['person', 'student_registration_person', 'student_registration_guardians', 'access_informations_edit_person', 'accesses_list_person', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'othercontact_list_person', 'board_list_person', 'fusion_accesses_person'])]
- private $nationality;
- /**
- * @var string The place where the person was born.
- *
- * @Iri("https://schema.org/birthPlace")
- */
- #[ORM\Column(type: 'string', length: 50, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['person', 'student_registration_person', 'accesses_list_person', 'access_informations_edit_person', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'othercontact_list_person', 'board_list_person', 'own_access_person', 'own_student_access_person'])]
- private $birthPlace;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Person\InseeEnum', 'toArray'])]
- #[Groups(['person', 'access_mass_person', 'access_informations_edit_person', 'accesses_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'student_registration_person', 'fusion_accesses_person'])]
- private $insee;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['person', 'access_informations_edit_person'])]
- private $website;
- /**
- * @var string Given name. In the U.S., the first name of a Person. This can be used along with name instead of the name property.
- *
- * @Iri("https://schema.org/givenName")
- * @Confidentiality(visibility=\AppBundle\Enum\Confidentiality\ConfidentialityTypeEnum::VISIBILITY_ORGANIZATION)
- */
- #[ORM\Column(type: 'string', length: 50, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 50, maxMessage: 'invalid-max-length')]
- #[Groups(['person', 'template', 'access_reference_person', 'student_list_guardians', 'student_list_person', 'access_details_person', 'access_details_guardians', 'access_details_children', 'access_details_companyperson', 'access_details_accessfamily', 'guardians_list_person', 'teachers_list_person', 'student_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'accesses_list_person', 'rule_person', 'access_details_billingpayers', 'billaccounting_list_billlines', 'equipmentaccounting_list_supplier', 'equipmentmediatheque_list_supplier', 'othercontact_list_person', 'donor_list_access', 'medal_list_access', 'viewaudit_list_updatedby', 'viewaudit_list_createdby', 'my_student_list_access', 'report_card_person', 'report_card_guardians', 'report_card_educationstudent', 'access_details_educationstudent', 'access_details_companypersonaccesses', 'student_registration_person', 'student_registration_guardians', 'student_registration_accessfamily', 'access_details_organization', 'access_informations_edit_person', 'equipment_details_editor', 'equipment_details_managercontrol', 'equipment_details_equipmentloanfiltered', 'student_list_courses', 'adherent_list_guardians', 'access_duplicate_control_list_person', 'event_details_organizer', 'board_list_person', 'event_details_eventuserfiltered', 'examen_details_convocation', 'examen_details_jury', 'course_details_organizer', 'course_details_students', 'educationalproject_details_silentpartner', 'educationalproject_details_billingreceivers', 'educationalproject_details_organizer', 'licence_cmf_person', 'networkmanagers_list_person', 'educationstudent_reference_access', 'educationstudent_reference_teachers', 'educationteacher_reference_teacher', 'adherent_contact_person', 'adherent_contact_guardians', 'own_access_person', 'access_details_accessfamily', 'accesses_rules_person', 'billpayment_list_bill', 'organization_details_organizationlicences', 'payer_list_person', 'payer_list_billingpayers', 'invitations_list_guest', 'all_accesses_list_person', 'event_details_eventuser', 'billcredit_list_access', 'equipment_list_equipmentloan', 'equipmentmediatheque_list_equipmentloan', 'equipmentcostume_list_equipmentloan', 'sepa_debit_mandate_person', 'cotisation_responsibles_accesses_person', 'fusion_accesses_person', 'equipment_availability_form_borrower', 'course_details_attendancebooking', 'examen_details_attendancebooking', 'educationalproject_details_attendancebooking', 'event_details_attendancebooking', 'equipment_availability_form_borrower', 'education_input_list_teachers', 'education_input_list_access', 'view_from_manager_create_person', 'bill_list_billlines', 'education_student_next_year_access', 'online_registration_access_details_person', 'access_intangible_list_access', 'accesses_no_reregistred_list_person', 'accessholidays_list_access', 'educationstudent_notation_access', 'email_detail_author', 'cmf_network_persons_person', 'build_bills_access', 'build_bills_billlines'])]
- private $givenName;
- /**
- * @var string The name of the item.
- *
- * @Confidentiality(visibility=\AppBundle\Enum\Confidentiality\ConfidentialityTypeEnum::VISIBILITY_ORGANIZATION)
- * @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(['person', 'template', 'access_reference_person', 'morals_list_person', 'access_details_person', 'student_list_person', 'access_details_accessfamily', 'access_details_guardians', 'access_details_children', 'access_details_companyperson', 'access_details_accessfamily', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'accesses_list_person', 'rule_person', 'access_details_billingpayers', 'billaccounting_list_billlines', 'equipment_list_supplier', 'equipmentaccounting_list_supplier', 'equipmentmediatheque_list_supplier', 'equipmentaccounting_list_supplier', 'equipmentmediatheque_list_supplier', 'othercontact_list_person', 'donor_list_access', 'equipmentcostume_list_access', 'medal_list_access', 'viewaudit_list_updatedby', 'viewaudit_list_createdby', 'my_student_list_access', 'report_card_person', 'report_card_guardians', 'report_card_educationstudent', 'access_details_educationstudent', 'access_details_companypersonaccesses', 'access_details_companypersoncompany', 'student_registration_person', 'student_registration_guardians', 'student_registration_accessfamily', 'access_details_organization', 'access_informations_edit_person', 'equipment_details_editor', 'equipment_details_supplier', 'educationstudent_notation_access', 'equipment_details_managercontrol', 'equipment_details_equipmentrepair', 'equipment_details_equipmentloanfiltered', 'student_list_courses', 'adherent_list_guardians', 'access_duplicate_control_list_person', 'event_details_organizer', 'board_list_person', 'event_details_eventuser', 'event_details_eventuserfiltered', 'examen_details_convocation', 'examen_details_jury', 'course_details_organizer', 'course_details_students', 'educationalproject_details_silentpartner', 'educationalproject_details_operationalpartner', 'educationalproject_details_financiers', 'educationalproject_details_billingreceivers', 'educationalproject_details_organizer', 'licence_cmf_person', 'networkmanagers_list_person', 'educationstudent_reference_access', 'educationstudent_reference_teachers', 'educationteacher_reference_teacher', 'adherent_contact_person', 'adherent_contact_guardians', 'own_access_person', 'access_details_accessfamily', 'equipmentmediatheque_list_editor', 'othercontact_list_companypersoncompany', 'accesses_rules_person', 'billpayment_list_bill', 'organization_details_organizationlicences', 'payer_list_person', 'all_accesses_list_person', 'payer_list_billingpayers', 'invitations_list_guest', 'event_details_eventuser', 'billcredit_list_access', 'student_list_guardians', 'equipment_list_equipmentloan', 'equipmentmediatheque_list_equipmentloan', 'equipmentcostume_list_equipmentloan', 'cotisation_responsibles_accesses_person', 'fusion_accesses_person', 'equipment_availability_form_borrower', 'course_details_attendancebooking', 'examen_details_attendancebooking', 'educationalproject_details_attendancebooking', 'event_details_attendancebooking', 'equipment_availability_form_borrower', 'education_input_list_access', 'education_input_list_teachers', 'view_from_manager_create_person', 'bill_list_billlines', 'education_student_next_year_access', 'online_registration_access_details_person', 'access_intangible_list_access', 'accesses_no_reregistred_list_person', 'accessholidays_list_access', 'email_detail_author', 'cmf_network_persons_person', 'build_bills_access', 'build_bills_billlines'])]
- private $name;
- /**
- * @var string
- *
- * @ExportSplitFields({"name","givenName"})
- */
- #[Groups(['person', 'message_list_author', 'messagesend_list_author', 'template_list_author', 'attendancebooking_list_access', 'bill_list_access', 'billaccounting_list_access', 'examenconvocation_list_student', 'guardians_list_children', 'commission_list_commissionmembers', 'morals_list_companypersonaccesses', 'student_list_guardians', 'placerepair_list_provider', 'equipmentcostume_list_access', 'equipmentcontrol_list_accompanist', 'equipmentcontrol_list_equipment', 'equipment_list_access', 'equipmentloan_list_borrower', 'equipmentrent_list_borrower', 'equipmentrepair_list_provider', 'presence_attendance_convocation', 'presence_attendance_students', 'presence_attendance_eventuser', 'accesses_list_guardians', 'adherent_list_guardians', 'equipment_details_equipmentloanfiltered', 'medal_list_access', 'attendance_list_access', 'attendance_list_replacement', 'donor_list_access', 'adherent_contact_guardians', 'student_list_educationstudent', 'billpayment_list_bill', 'educationnotation_list_educationstudent', 'planning_detail_organizer', 'planning_detail_students', 'planning_detail_attendancebooking', 'planning_detail_convocation', 'planning_detail_jury', 'payer_list_billingpayers', 'all_accesses_list_person', 'billcredit_list_access', 'invitations_list_guest', 'equipmentmediatheque_list_access', 'education_input_list_access', 'education_input_list_teachers', 'education_student_next_year_teachers', 'education_student_next_year_educationstudentlastyear', 'attendancebooking_list_course', 'access_intangible_list_access', 'billpayment_list_bill', 'accesses_no_reregistred_list_educationstudent', 'accesses_no_reregistred_list_guardians', 'worksbyusers_db_work', 'accessholidays_list_access', 'payer_list_person', 'accessholidays_list_access', 'advancepayment_list_access', 'billpayment_list_accessbillingaccountbalancereimbursement', 'educationstudent_notation_access'])]
- private $fullNameTemplate;
- /**
- * @var string
- * @ExportSplitFields({"gender","name","givenName","contactPoint.email","contactPoint.telphoneTemplate","contactPoint.mobilPhoneTemplate"})
- */
- #[Groups(['student_list_guardians', 'accesses_list_guardians', 'adherent_list_guardians', 'accesses_no_reregistred_list_guardians'])]
- private $fullNameAndContactTemplate;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Person\MoralPersonTypeEnum', 'toArray'])]
- #[Groups(['person', 'morals_list_person', 'access_informations_edit_person', 'access_details_person'])]
- private $typeMoral;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => true])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['person', 'access_reference_person', 'access_details_person', 'access_informations_edit_person', 'donor_list_access', 'accessbilling_edit_person'])]
- private $isPhysical = true;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => true])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['person', 'access_informations_edit_person', 'student_registration_person', 'accesses_list_person', 'access_mass_person', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'othercontact_list_person', 'board_list_person', 'own_access_person', 'own_student_access_person', 'access_details_person', 'fusion_accesses_person', 'online_registration_access_details_person'])]
- private $imageRight = true;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array')]
- #[Assert\Type(type: 'array')]
- #[Groups(['person', 'access_mass_person', 'access_details_person'])]
- private $confidentiality = array();
- /**
- * @var Medical
- */
- #[Assert\Valid]
- #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Person\Medical', inversedBy: 'person', cascade: ['persist'], fetch: 'EAGER')]
- #[ORM\JoinColumn(nullable: true)]
- #[Groups(['person', 'access_mass_person', 'access_details_person', 'access_details', 'student_registration_person', 'accesses_list_person', 'student_list_person', 'adherent_list_person', 'own_student_access_person', 'fusion_accesses_person', 'online_registration_access_details_person'])]
- private $medical;
- /**
- * @var ArrayCollection<Access>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', mappedBy: 'person', orphanRemoval: true)]
- #[Groups(['person_access'])]
- private $access;
- /**
- * @var ArrayCollection<File>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'person', orphanRemoval: true)]
- #[Groups(['person_file', 'access_details_person'])]
- private $files;
- /**
- * @var ArrayCollection<DisciplineOtherEstablishment>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\DisciplineOtherEstablishment', mappedBy: 'person', orphanRemoval: true, cascade: ['persist'])]
- #[Groups(['person_disciplineotherestablishment', 'access_details_person'])]
- private $disciplineotherestablishments;
- /**
- * @var ArrayCollection<Qualification>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\Qualification', mappedBy: 'person', orphanRemoval: true, cascade: ['persist'])]
- #[Groups(['person_qualification', 'access_informations_edit_person'])]
- private $qualifications;
- /**
- * @var ArrayCollection<SchoolingInEstablishment>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\SchoolingInEstablishment', mappedBy: 'person', orphanRemoval: true, cascade: ['persist'])]
- #[Groups(['person_schoolinginestablishment', 'access_details_person'])]
- private $schoolingEstablisments;
- /**
- * @var ArrayCollection<TeacherSchoolingHistory>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\TeacherSchoolingHistory', mappedBy: 'person', orphanRemoval: true, cascade: ['persist'])]
- #[Groups(['person_teacherschoolinghistory', 'access_details_person'])]
- private $teacherSchoolingHistories;
- /**
- * @var int
- */
- #[Groups(['template', 'student_list_person', 'guardians_list_person', 'personnels_list_person', 'othercontact_list_person', 'ca_list_person', 'adherent_list_person', 'accesses_list_person', 'teachers_list_person', 'board_list_person', 'education_student_next_year_access'])]
- protected $ageTemplate;
- /**
- * @var ArrayCollection|File[]
- */
- #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'accessPersons', cascade: ['persist'])]
- #[ORM\OrderBy(['id' => 'DESC'])]
- #[Groups(['person_files', 'access_files_person'])]
- private $personFiles;
- /**
- * @var ArrayCollection|File[]
- */
- #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'accessPersons', cascade: ['persist'], fetch: 'EXTRA_LAZY')]
- #[ORM\OrderBy(['id' => 'DESC'])]
- #[Groups(['access_details_person'])]
- private $personFilesFiltered;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Groups(['my_access_put_person', 'own_access_person', 'access_details_person', 'person'])]
- private $accessFavorite = false;
- /**
- * @var \DateTime
- */
- #[ORM\Column(name: 'login_requested_at', type: 'datetime', nullable: true)]
- #[Groups(['person'])]
- private $loginRequestedAt;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 150, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 150, maxMessage: 'invalid-max-length')]
- #[Groups(['person', 'access_informations_edit_person'])]
- private $profession;
- /**
- * @var ArrayCollection<DocumentWish>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\DocumentWish', mappedBy: 'personOwner', cascade: ['persist'], orphanRemoval: true)]
- #[Groups(['person_documentwishes', 'access_files_person', 'student_registration_person'])]
- private $documentWishes;
- public function __construct()
- {
- parent::__construct();
- $this->contactPoint = new ArrayCollection();
- $this->bankAccount = new ArrayCollection();
- $this->personAddressPostal = new ArrayCollection();
- $this->access = new ArrayCollection();
- $this->files = new ArrayCollection();
- $this->disciplineotherestablishments = new ArrayCollection();
- $this->qualifications = new ArrayCollection();
- $this->schoolingEstablisments = new ArrayCollection();
- $this->teacherSchoolingHistories = new ArrayCollection();
- $this->documentWishes = new ArrayCollection();
- }
- public function __toString()
- {
- return parent::__toString(); // TODO: Change the autogenerated stub
- }
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- $this->setLegacyId($id);
- return $this;
- }
- /**
- * Gets id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Sets birthDate.
- *
- * @param \DateTime $birthDate
- *
- * @return $this
- */
- public function setBirthDate(\DateTime $birthDate = null)
- {
- $this->birthDate = $birthDate;
- return $this;
- }
- /**
- * Gets birthDate.
- *
- * @return \DateTime
- */
- public function getBirthDate()
- {
- return $this->birthDate ? $this->birthDate->format('Y-m-d') : $this->birthDate;
- }
- /**
- * Sets gender.
- *
- * @param string $gender
- *
- * @return $this
- */
- public function setGender($gender)
- {
- $this->gender = $gender;
- return $this;
- }
- /**
- * Gets gender.
- *
- * @return string
- */
- public function getGender()
- {
- return $this->gender;
- }
- /**
- * Sets givenName.
- *
- * @param string $givenName
- *
- * @return $this
- */
- public function setGivenName($givenName)
- {
- $this->givenName = $givenName;
- return $this;
- }
- /**
- * Gets givenName.
- *
- * @return string
- */
- public function getGivenName()
- {
- return $this->givenName;
- }
- /**
- * Sets nationality.
- *
- * @param Country $nationality
- *
- * @return $this
- */
- public function setNationality(Country $nationality = null)
- {
- $this->nationality = $nationality;
- return $this;
- }
- /**
- * Gets nationality.
- *
- * @return Country
- */
- public function getNationality()
- {
- return $this->nationality;
- }
- /**
- * Sets birthPlace.
- *
- * @param string $birthPlace
- *
- * @return $this
- */
- public function setBirthPlace($birthPlace)
- {
- $this->birthPlace = $birthPlace;
- return $this;
- }
- /**
- * Gets birthPlace.
- *
- * @return string
- */
- public function getBirthPlace()
- {
- return $this->birthPlace;
- }
- /**
- * Sets insee.
- *
- * @param string $insee
- *
- * @return $this
- */
- public function setInsee($insee)
- {
- $this->insee = $insee;
- return $this;
- }
- /**
- * Gets insee.
- *
- * @return string
- */
- public function getInsee()
- {
- return $this->insee;
- }
- /**
- * Sets website.
- *
- * @param string $website
- *
- * @return $this
- */
- public function setWebsite($website)
- {
- $this->website = $website;
- return $this;
- }
- /**
- * Gets website.
- *
- * @return string
- */
- public function getWebsite()
- {
- return $this->website;
- }
- /**
- * Sets image.
- *
- * @param string $image
- *
- * @return $this
- */
- public function setImage($image)
- {
- $this->image = $image;
- return $this;
- }
- /**
- * Gets image.
- *
- * @return string
- */
- public function getImage()
- {
- return $this->image;
- }
- /**
- * Sets email.
- *
- * @param string $email
- *
- * @return $this
- */
- public function setEmail($email)
- {
- $this->email = $email;
- return $this;
- }
- /**
- * Gets email.
- *
- * @return string
- */
- public function getEmail()
- {
- return $this->email;
- }
- /**
- * Sets username.
- *
- * @param string $username
- *
- * @return $this
- */
- public function setUsername($username)
- {
- $this->username = $username;
- return $this;
- }
- /**
- * Gets username.
- *
- * @return string
- */
- public function getUsername()
- {
- return $this->username;
- }
- /**
- * Sets password.
- *
- * @param string $password
- *
- * @return $this
- */
- public function setPassword($password)
- {
- $this->password = $password;
- return $this;
- }
- /**
- * Gets password.
- *
- * @return string
- */
- public function getPassword()
- {
- return $this->password;
- }
- /**
- * Sets name.
- *
- * @param string $name
- *
- * @return $this
- */
- public function setName($name)
- {
- $this->name = $this->isPhysical ? strtoupper($name) : $name;
- return $this;
- }
- /**
- * Gets name.
- *
- * @return string
- */
- public function getName()
- {
- return $this->isPhysical ? strtoupper($this->name) : $this->name;
- }
- /**
- * Sets typeMoral.
- *
- * @param string $typeMoral
- *
- * @return $this
- */
- public function setTypeMoral($typeMoral)
- {
- $this->typeMoral = $typeMoral;
- return $this;
- }
- /**
- * Gets typeMoral.
- *
- * @return string
- */
- public function getTypeMoral()
- {
- return $this->typeMoral;
- }
- /**
- * Add personAddressPostal
- *
- * @param PersonAddressPostal $personAddressPostal
- * @return Person
- */
- public function addPersonAddressPostal(PersonAddressPostal $personAddressPostal)
- {
- $personAddressPostal->setPerson($this);
- $this->personAddressPostal[] = $personAddressPostal;
- return $this;
- }
- /**
- * Remove personAddressPostal
- *
- * @param PersonAddressPostal $personAddressPostal
- */
- public function removePersonAddressPostal(PersonAddressPostal $personAddressPostal)
- {
- $this->personAddressPostal->removeElement($personAddressPostal);
- }
- /**
- * Get personAddressPostal
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getPersonAddressPostal()
- {
- return $this->personAddressPostal;
- }
- /**
- * Get personAddressPostal
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getPersonAddressPostalPrincipal()
- {
- $principal = [];
- foreach ($this->personAddressPostal as $personAddressPostal){
- if($personAddressPostal->getType() === AddressPostalTypeEnum::ADDRESS_PRINCIPAL){
- $principal = new ArrayCollection([$personAddressPostal]);
- }
- }
- return $principal;
- }
- /**
- * Add contact Point
- *
- * @param ContactPoint $contactPoint
- * @return Person
- */
- public function addContactPoint(ContactPoint $contactPoint)
- {
- $contactPoint->addPerson($this);
- $this->contactPoint[] = $contactPoint;
- return $this;
- }
- /**
- * Remove contact Point
- *
- * @param ContactPoint $contactPoint
- */
- public function removeContactPoint(ContactPoint $contactPoint)
- {
- $this->contactPoint->removeElement($contactPoint);
- }
- /**
- * Get contact Point
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getContactPoint()
- {
- return $this->contactPoint;
- }
- /**
- * Add bankAccount
- *
- * @param BankAccount $bankAccount
- * @return Person
- */
- public function addBankAccount(BankAccount $bankAccount)
- {
- $this->bankAccount[] = $bankAccount;
- $bankAccount->addPerson($this);
- return $this;
- }
- /**
- * Remove bankAccount
- *
- * @param BankAccount $bankAccount
- */
- public function removeBankAccount(BankAccount $bankAccount)
- {
- $this->bankAccount->removeElement($bankAccount);
- }
- /**
- * Get bankAccount
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getBankAccount()
- {
- return $this->bankAccount;
- }
- /**
- * Sets isPhysical.
- *
- * @param bool $isPhysical
- *
- * @return $this
- */
- public function setIsPhysical($isPhysical)
- {
- $this->isPhysical = $isPhysical;
- return $this;
- }
- /**
- * Gets isPhysical.
- *
- * @return bool
- */
- public function getIsPhysical()
- {
- return $this->isPhysical;
- }
- /**
- * Sets imageRight.
- *
- * @param bool $imageRight
- *
- * @return $this
- */
- public function setImageRight($imageRight)
- {
- $this->imageRight = $imageRight;
- return $this;
- }
- /**
- * Gets imageRight.
- *
- * @return bool
- */
- public function getImageRight()
- {
- return $this->imageRight;
- }
- /**
- * @return \DateTime
- */
- public function getCredentialsExpireAt()
- {
- return $this->credentialsExpireAt;
- }
- /**
- * @param \DateTime $credentialsExpireAt
- */
- public function setCredentialsExpireAt(\DateTime $credentialsExpireAt)
- {
- $this->credentialsExpireAt = $credentialsExpireAt;
- return $this;
- }
- /**
- * @return \DateTime
- */
- public function getExpiresAt()
- {
- return $this->expiresAt;
- }
- /**
- * @param \DateTime $expiresAt
- */
- public function setExpiresAt(\DateTime $expiresAt)
- {
- $this->expiresAt = $expiresAt;
- return $this;
- }
- public function setUsernameCanonical($usernameCanonical)
- {
- if (empty($usernameCanonical) || !isset($usernameCanonical))
- $this->usernameCanonical = NULL;
- else
- $this->usernameCanonical = $usernameCanonical;
- return $this;
- }
- public function getFullname()
- {
- return sprintf("%s %s", $this->getName(), $this->getGivenName());
- }
- /**
- * Get confidentiality
- *
- * @return array
- */
- public function getConfidentiality()
- {
- return $this->confidentiality ? $this->confidentiality : [];
- }
- /**
- * Set confidentiality
- *
- * @return Person
- */
- public function setConfidentiality(array $confidentiality)
- {
- $this->confidentiality = $confidentiality;
- return $this;
- }
- /**
- * Set medical
- *
- * @param \AppBundle\Entity\Person\Medical $medical
- *
- * @return Person
- */
- public function setMedical(\AppBundle\Entity\Person\Medical $medical = null)
- {
- $this->medical = $medical;
- return $this;
- }
- /**
- * Get medical
- *
- * @return \AppBundle\Entity\Person\Medical
- */
- public function getMedical()
- {
- return $this->medical;
- }
- /**
- * Get enabled
- *
- * @return boolean
- */
- public function getEnabled()
- {
- return $this->enabled;
- }
- /**
- * Set enabled
- *
- * @return boolean
- */
- public function setEnabled($enabled)
- {
- $this->enabled = $enabled;
- return $this;
- }
- /**
- * Set salt
- *
- * @param string $salt
- *
- * @return Person
- */
- public function setSalt($salt)
- {
- $this->salt = $salt;
- return $this;
- }
- /**
- * Get locked
- *
- * @return boolean
- */
- public function getLocked()
- {
- return $this->locked;
- }
- /**
- * Get expired
- *
- * @return boolean
- */
- public function getExpired()
- {
- return $this->expired;
- }
- /**
- * Get credentialsExpired
- *
- * @return boolean
- */
- public function getCredentialsExpired()
- {
- return $this->credentialsExpired;
- }
- /**
- * Add access
- *
- * @param \AppBundle\Entity\AccessAndFunction\Access $access
- *
- * @return Person
- */
- public function addAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
- {
- $access->setPerson($this);
- $this->access[] = $access;
- return $this;
- }
- /**
- * Remove access
- *
- * @param \AppBundle\Entity\AccessAndFunction\Access $access
- */
- public function removeAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
- {
- $this->access->removeElement($access);
- }
- /**
- * Get access
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getAccess()
- {
- return $this->access;
- }
- /**
- * Add file
- *
- * @param \AppBundle\Entity\Core\File $file
- *
- * @return Person
- */
- public function addFile(\AppBundle\Entity\Core\File $file)
- {
- $this->files[] = $file;
- return $this;
- }
- /**
- * Remove file
- *
- * @param \AppBundle\Entity\Core\File $file
- */
- public function removeFile(\AppBundle\Entity\Core\File $file)
- {
- $this->files->removeElement($file);
- }
- /**
- * Get files
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getFiles()
- {
- return $this->files;
- }
- /**
- * Add disciplineotherestablishment
- *
- * @param \AppBundle\Entity\Person\DisciplineOtherEstablishment $disciplineotherestablishment
- *
- * @return Person
- */
- public function addDisciplineotherestablishment(\AppBundle\Entity\Person\DisciplineOtherEstablishment $disciplineotherestablishment)
- {
- $disciplineotherestablishment->setPerson($this);
- $this->disciplineotherestablishments[] = $disciplineotherestablishment;
- return $this;
- }
- /**
- * Remove disciplineotherestablishment
- *
- * @param \AppBundle\Entity\Person\DisciplineOtherEstablishment $disciplineotherestablishment
- */
- public function removeDisciplineotherestablishment(\AppBundle\Entity\Person\DisciplineOtherEstablishment $disciplineotherestablishment)
- {
- $this->disciplineotherestablishments->removeElement($disciplineotherestablishment);
- }
- /**
- * Get disciplineotherestablishments
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getDisciplineotherestablishments()
- {
- return $this->disciplineotherestablishments;
- }
- /**
- * Add qualification
- *
- * @param \AppBundle\Entity\Person\Qualification $qualification
- *
- * @return Person
- */
- public function addQualification(\AppBundle\Entity\Person\Qualification $qualification)
- {
- $qualification->setPerson($this);
- $this->qualifications[] = $qualification;
- return $this;
- }
- /**
- * Remove qualification
- *
- * @param \AppBundle\Entity\Person\Qualification $qualification
- */
- public function removeQualification(\AppBundle\Entity\Person\Qualification $qualification)
- {
- $this->qualifications->removeElement($qualification);
- }
- /**
- * Get qualifications
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getQualifications()
- {
- return $this->qualifications;
- }
- /**
- * Add schoolingEstablisment
- *
- * @param \AppBundle\Entity\Person\SchoolingInEstablishment $schoolingEstablisment
- *
- * @return Person
- */
- public function addSchoolingEstablisment(\AppBundle\Entity\Person\SchoolingInEstablishment $schoolingEstablisment)
- {
- $schoolingEstablisment->setPerson($this);
- $this->schoolingEstablisments[] = $schoolingEstablisment;
- return $this;
- }
- /**
- * Remove schoolingEstablisment
- *
- * @param \AppBundle\Entity\Person\SchoolingInEstablishment $schoolingEstablisment
- */
- public function removeSchoolingEstablisment(\AppBundle\Entity\Person\SchoolingInEstablishment $schoolingEstablisment)
- {
- $this->schoolingEstablisments->removeElement($schoolingEstablisment);
- }
- /**
- * Get schoolingEstablisments
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getSchoolingEstablisments()
- {
- return $this->schoolingEstablisments;
- }
- /**
- * Add teacherSchoolingHistory
- *
- * @param \AppBundle\Entity\Person\TeacherSchoolingHistory $teacherSchoolingHistory
- *
- * @return Person
- */
- public function addTeacherSchoolingHistory(\AppBundle\Entity\Person\TeacherSchoolingHistory $teacherSchoolingHistory)
- {
- $teacherSchoolingHistory->setPerson($this);
- $this->teacherSchoolingHistories[] = $teacherSchoolingHistory;
- return $this;
- }
- /**
- * Remove teacherSchoolingHistory
- *
- * @param \AppBundle\Entity\Person\TeacherSchoolingHistory $teacherSchoolingHistory
- */
- public function removeTeacherSchoolingHistory(\AppBundle\Entity\Person\TeacherSchoolingHistory $teacherSchoolingHistory)
- {
- $this->teacherSchoolingHistories->removeElement($teacherSchoolingHistory);
- }
- /**
- * Get teacherSchoolingHistories
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getTeacherSchoolingHistories()
- {
- return $this->teacherSchoolingHistories;
- }
- /**
- * Gets age.
- *
- * @return int
- */
- 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 string
- */
- public function getFullNameTemplate()
- {
- return $this->getName() . ' ' . $this->getGivenName();
- }
- /**
- * Gets full name.
- *
- * @return string
- */
- public function getFullNameAndContactTemplate()
- {
- $fullNameAndContactTemplate[] = [ 'value' => $this->getGender(), 'translate' => true ];
- $fullNameAndContactTemplate[] = ' - ';
- $fullNameAndContactTemplate[] = $this->getFullNameTemplate();
- foreach ($this->getContactPoint() as $contactPoint) {
- $fullNameAndContactTemplate[] = ' - ';
- $fullNameAndContactTemplate[] = [ 'value' => $contactPoint->getContactType(), 'translate' => true ];
- $fullNameAndContactTemplate[] = ' : ';
- // $fullNameAndContactTemplate = array_merge($fullNameAndContactTemplate, $contactPoint->getFullLabelTemplate());
- }
- return $fullNameAndContactTemplate;
- }
- /**
- * Add personFile
- *
- * @param \AppBundle\Entity\Core\File $personFile
- *
- * @return Person
- */
- public function addPersonFile(\AppBundle\Entity\Core\File $personFile)
- {
- $this->personFiles[] = $personFile;
- return $this;
- }
- /**
- * Remove personFile
- *
- * @param \AppBundle\Entity\Core\File $personFile
- */
- public function removePersonFile(\AppBundle\Entity\Core\File $personFile)
- {
- $this->personFiles->removeElement($personFile);
- }
- /**
- * Get personFiles
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getPersonFiles()
- {
- return $this->personFiles;
- }
- /**
- * Get personFilesFiltered
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getPersonFilesFiltered()
- {
- return $this->personFiles ? $this->personFiles->slice(0, 5) : [];
- }
- /**
- * @return Access
- */
- public function getAccessFavorite()
- {
- return $this->accessFavorite;
- }
- /**
- * @param int $accessFavorite
- */
- public function setAccessFavorite($accessFavorite)
- {
- $this->accessFavorite = $accessFavorite;
- }
- public function setLoginRequestedAt(\DateTime $date = null)
- {
- $this->loginRequestedAt = $date;
- return $this;
- }
- /**
- * Gets the timestamp that the user requested a auto login.
- *
- * @return null|\DateTime
- */
- public function getLoginRequestedAt()
- {
- return $this->loginRequestedAt;
- }
- public function isLoginRequestNonExpired($ttl)
- {
- return $this->getLoginRequestedAt() instanceof \DateTime &&
- $this->getLoginRequestedAt()->getTimestamp() + $ttl > time();
- }
- /**
- *
- * {@inheritdoc}
- */
- public function getContact()
- {
- return $this;
- }
- /**
- *
- * {@inheritdoc}
- */
- public function getContactAddress()
- {
- return $this->getAddressPostalForType(\AppBundle\Enum\Core\AddressPostalTypeEnum::ADDRESS_PRINCIPAL);
- }
- /**
- *
- * {@inheritdoc}
- */
- public function getContactContactPoint()
- {
- return $this->getContactPointPrincipal();
- }
- /**
- *
- * {@inheritdoc}
- */
- public function getContactName()
- {
- return $this->getFullname();
- }
- /**
- * Set profession
- *
- * @param string $profession
- *
- * @return Person
- */
- public function setProfession($profession)
- {
- $this->profession = $profession;
- return $this;
- }
- /**
- * Get profession
- *
- * @return string
- */
- public function getProfession()
- {
- return $this->profession;
- }
- /**
- * Add documentWish
- *
- * @param \AppBundle\Entity\AccessWish\DocumentWish $documentWish
- *
- * @return Person
- */
- public function addDocumentWish(\AppBundle\Entity\AccessWish\DocumentWish $documentWish)
- {
- $documentWish->setPersonOwner($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;
- }
- }
|