| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854 |
- <?php
- namespace AppBundle\Entity\Product;
- use AppBundle\Annotation\ExportSplitFields;
- use AppBundle\Entity\AccessAndFunction\Access;
- 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\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- use AppBundle\Entity\Person\Person;
- use AppBundle\Entity\Place\Room;
- use AppBundle\Entity\Place\Place;
- /**
- * Equipement, matériel
- *
- * @Iri("http://schema.org/Equipment")
- */
- #[ORM\Entity(repositoryClass: 'AppBundle\Entity\Product\Repository\EquipmentRepository')]
- class Equipment extends AbstractProduct
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipments', cascade: ['persist'])]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'accessequipment_grid', 'equipmentmediatheque_list'])]
- private $access;
- /**
- * @var string The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
- *
- * @Iri("https://schema.org/brand")
- */
- #[ORM\Column(type: 'string', length: 40, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_reference', 'equipment_list', 'equipment_list_equipmentcomposition', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'place_list_equipmentuseds', 'accessequipment_grid_equipments', 'access_details_equipments', 'equipment_details', 'equipment_details_equipmentcomposition', 'own_access_equipments', 'own_student_access_equipments', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_availability_form_equipment'])]
- private $brand;
- /**
- * @var string An associated image.
- *
- * @Iri("https://schema.org/image")
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_details'])]
- private $image;
- /**
- * @var string The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties.
- *
- * @Iri("https://schema.org/model")
- */
- #[ORM\Column(type: 'string', length: 40, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_reference', 'equipment_list', 'equipment_list_equipmentcomposition', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'place_list_equipmentuseds', 'accessequipment_grid_equipments', 'access_details_equipments', 'equipment_details', 'equipment_details_equipmentcomposition', 'own_access_equipments', 'own_student_access_equipments', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_availability_form_equipment'])]
- private $model;
- /**
- * @var string The name of the item.
- *
- * @Iri("https://schema.org/name")
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_reference', 'equipmentloan_list_equipment', 'equipmentmediatheque_list', 'place_list_equipmentuseds', 'examenconvocation_list_equipments', 'equipment_details_equipmentcomposition', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_details', 'equipmentrent_list_equipment', 'equipment_availability_form_equipment'])]
- private $name;
- /**
- * @var string The product identifier, such as ISBN. For example: `<meta itemprop='productID' content='isbn:123-456-789'/>`.
- *
- * @Iri("https://schema.org/productID")
- */
- #[ORM\Column(type: 'string', length: 30, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_reference', 'equipmentrepair_list_equipment', 'accessequipment_grid_equipments', 'equipment_details', 'equipment_list', 'equipmentcostume_list', 'own_access_equipments', 'own_student_access_equipments', 'equipment_availability_form_equipment'])]
- private $productID;
- /**
- * @var string The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
- *
- * @Iri("https://schema.org/sku")
- */
- #[ORM\Column(type: 'string', length: 35, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_list', 'equipment_reference', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'equipment_details', 'equipmentmediatheque_list', 'equipment_availability_form_equipment'])]
- private $sku;
- /**
- * @var \DateTime The date the item e.g. vehicle was purchased by the current owner.
- *
- * @Iri("https://schema.org/purchaseDate")
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $purchaseDate;
- /**
- * @var Place
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Place', inversedBy: 'equipmentStorages')]
- #[ORM\JoinColumn(name: 'place_storage_id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $placeStorage;
- /**
- * @var Room
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Room', inversedBy: 'equipmentStorages')]
- #[ORM\JoinColumn(name: 'room_storage_id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $roomStorage;
- /**
- * @var Place
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Place', inversedBy: 'equipmentUseds')]
- #[ORM\JoinColumn(name: 'place_used_id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details', 'equipment_reference'])]
- private $placeWhereIsUsed;
- /**
- * @var Room
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Room', inversedBy: 'equipmentUseds')]
- #[ORM\JoinColumn(name: 'room_used_id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $roomWhereIsUsed;
- /**
- * @var string
- */
- #[ORM\Column(type: 'boolean', options: ['default' => true])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['equipment', 'equipment_details'])]
- private $isSamePlaceToStockAndUsed = true;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 100, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $additionalStoragePlace;
- /**
- * @var EquipmentList
- */
- #[ORM\ManyToOne(targetEntity: 'EquipmentList')]
- #[ORM\JoinColumn(nullable: true)]
- #[Groups(['equipment', 'equipment_reference', 'equipment_list', 'equipment_list_equipmentcomposition', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'place_list_equipmentuseds', 'accessequipment_grid_equipments', 'access_details_equipmentloans', 'access_details_equipments', 'equipment_details', 'equipment_details_equipmentcomposition', 'own_access_equipments', 'own_student_access_equipments', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_availability_form_equipment'])]
- private $equipmentList;
- /**
- * @var ArrayCollection<EquipmentComposition>
- */
- #[ORM\OneToMany(targetEntity: 'EquipmentComposition', mappedBy: 'parent', orphanRemoval: true)]
- #[Groups(['equipment_equipmentcomposition', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
- private $equipmentComposition;
- /**
- * @var ArrayCollection<EquipmentRepair>
- */
- #[ORM\OneToMany(targetEntity: 'EquipmentRepair', mappedBy: 'equipment', orphanRemoval: true)]
- #[Groups(['equipment_equipmentrepair', 'equipment_details'])]
- private $equipmentRepair;
- /**
- * @var ArrayCollection<EquipmentControl>
- */
- #[ORM\OneToMany(targetEntity: 'EquipmentControl', mappedBy: 'equipment', orphanRemoval: true, cascade: ['persist'])]
- #[Groups(['equipment_equipmentcontrol', 'equipment_details'])]
- private $equipmentControl;
- /**
- * @var ArrayCollection<EquipmentLoan>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', mappedBy: 'equipment', orphanRemoval: true, cascade: ['persist'])]
- #[Groups(['equipment_equipmentloan', 'equipment_details', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list'])]
- private $equipmentLoan;
- /**
- * @var ArrayCollection|EquipmentLoan[]
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', mappedBy: 'equipment', orphanRemoval: true, fetch: 'EXTRA_LAZY')]
- #[ORM\OrderBy(['id' => 'DESC'])]
- #[Groups(['equipment_details'])]
- private $equipmentLoanFiltered;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 35, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_list', 'equipment_reference', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'equipment_details', 'equipmentmediatheque_list'])]
- private $skuComplementary;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\EquipmentToneEnum', 'toArray'])]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list'])]
- private $tone;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\EquipmentStatusEnum', 'toArray'])]
- #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $status;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipmentSuppliers')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $supplier;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $purchasePrice;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 15, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $billNumber;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $tva;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\OutCauseEnum', 'toArray'])]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $outCause;
- /**
- * @var string
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['equipment', 'equipment_details'])]
- private $isComposition = false;
- /**
- * @var integer
- *
- *
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentcostume_list', 'equipment_details', 'equipment_reference'])]
- private $qte;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\CheckingEnum', 'toArray'])]
- #[Groups(['equipment'])]
- private $detailedChecking;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\CheckingEnum', 'toArray'])]
- #[Groups(['equipment'])]
- private $checking;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipmentControlManagers')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment'])]
- private $controlManager;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment'])]
- private $serviceLife;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment'])]
- private $maxUsedHour;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\EquipmentInsuranceEnum', 'toArray'])]
- #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentcostume_list', 'accessequipment_grid_equipments', 'own_access_equipments', 'own_student_access_equipments'])]
- private $insurance;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 100, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
- #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $composer;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 100, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
- #[Groups(['equipment', 'equipmentmediatheque_list'])]
- private $arranger;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 100, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
- #[Groups(['equipment'])]
- private $referenceEditor;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\OriginMusicScoreEnum', 'toArray'])]
- #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $origin;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $presenceDriver = false;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipmentEditors', cascade: ['persist'])]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment', 'access', 'equipment_details', 'equipmentmediatheque_list'])]
- private $editor;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\BandEnum', 'toArray'])]
- #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $band;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipmentmediatheque_list', 'equipment_details'])]
- private $style;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipmentmediatheque_list', 'equipment_details'])]
- private $duration;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\DifficultyEnum', 'toArray'], message: 'invalid-choice')]
- #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
- private $difficulty;
- /**
- * @var ArrayCollection<EquipmentList>
- */
- #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentList')]
- #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
- #[ORM\JoinColumn(name: 'equipment_id', referencedColumnName: 'id')]
- #[ORM\JoinColumn(name: 'equipmentlist_id', referencedColumnName: 'id')]
- #[Groups(['equipment', 'equipment_equipmentlist', 'equipmentmediatheque_list', 'equipment_details'])]
- private $instrumentOrVoice;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
- private $breakingLoad;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
- private $mua;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
- private $cmu;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
- private $cmr;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
- private $verticalEffort;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
- private $horizontalEffort;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
- private $theoreticalServiceLifeControl;
- /**
- * @var integer
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
- private $maximumDurationOfUseControl;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Product\PeriodicityControlEnum', 'toArray'])]
- #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
- private $periodicityControl;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
- private $managerControl;
- /**
- * @var \DateTime
- */
- #[ORM\Column(type: 'time', nullable: true)]
- #[Assert\Time]
- #[Groups(['equipment', 'equipmentmediatheque_list', 'equipment_details'])]
- private $durationTime;
- /**
- * @var string
- *
- *
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['equipment', 'equipment_details'])]
- private $isbn;
- /**
- * @var string
- * @ExportSplitFields({"equipmentList.familly","equipmentList.category","name","brand","model"})
- *
- */
- #[Groups(['template', 'place_list_equipmentuseds'])]
- private $fullLabelTemplate;
- public function __construct()
- {
- parent::__construct();
- $this->instrumentOrVoice = new ArrayCollection();
- $this->equipmentComposition = new ArrayCollection();
- $this->equipmentRepair = new ArrayCollection();
- $this->equipmentControl = new ArrayCollection();
- $this->equipmentLoan = new ArrayCollection();
- $this->equipmentLoanFiltered = new ArrayCollection();
- }
- /**
- * Sets access.
- *
- * @param Access $access
- *
- * @return $this
- */
- public function setAccess(Access $access = null)
- {
- $this->access = $access;
- return $this;
- }
- /**
- * Gets access.
- *
- * @return Access
- */
- public function getAccess()
- {
- return $this->access;
- }
- /**
- * Sets brand.
- *
- * @param string $brand
- *
- * @return $this
- */
- public function setBrand($brand)
- {
- $this->brand = $brand;
- return $this;
- }
- /**
- * Gets brand.
- *
- * @return string
- */
- public function getBrand()
- {
- return $this->brand;
- }
- /**
- * 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 model.
- *
- * @param string $model
- *
- * @return $this
- */
- public function setModel($model)
- {
- $this->model = $model;
- return $this;
- }
- /**
- * Gets model.
- *
- * @return string
- */
- public function getModel()
- {
- return $this->model;
- }
- /**
- * Sets name.
- *
- * @param string $name
- *
- * @return $this
- */
- public function setName($name)
- {
- $this->name = $name;
- return $this;
- }
- /**
- * Gets name.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Sets productID.
- *
- * @param string $productID
- *
- * @return $this
- */
- public function setProductID($productID)
- {
- $this->productID = $productID;
- return $this;
- }
- /**
- * Gets productID.
- *
- * @return string
- */
- public function getProductID()
- {
- return $this->productID;
- }
- /**
- * Sets sku.
- *
- * @param string $sku
- *
- * @return $this
- */
- public function setSku($sku)
- {
- $this->sku = $sku;
- return $this;
- }
- /**
- * Gets sku.
- *
- * @return string
- */
- public function getSku()
- {
- return $this->sku;
- }
- /**
- * Sets purchaseDate.
- *
- * @param \DateTime $purchaseDate
- *
- * @return $this
- */
- public function setPurchaseDate(\DateTime $purchaseDate = null)
- {
- $this->purchaseDate = $purchaseDate;
- return $this;
- }
- /**
- * Gets purchaseDate.
- *
- * @return \DateTime
- */
- public function getPurchaseDate()
- {
- return $this->purchaseDate ? $this->purchaseDate->format('Y-m-d') : $this->purchaseDate;
- }
- /**
- * Sets placeStorage.
- *
- * @param Place $placeStorage
- *
- * @return $this
- */
- public function setPlaceStorage(Place $placeStorage = null)
- {
- $this->placeStorage = $placeStorage;
- return $this;
- }
- /**
- * Gets placeStorage.
- *
- * @return Place
- */
- public function getPlaceStorage()
- {
- return $this->placeStorage;
- }
- /**
- * Sets roomStorage.
- *
- * @param Room $roomStorage
- *
- * @return $this
- */
- public function setRoomStorage(Room $roomStorage = null)
- {
- $this->roomStorage = $roomStorage;
- return $this;
- }
- /**
- * Gets roomStorage.
- *
- * @return Room
- */
- public function getRoomStorage()
- {
- return $this->roomStorage;
- }
- /**
- * Sets placeWhereIsUsed
- *
- * @param Place $placeWhereIsUsed
- *
- * @return $this
- */
- public function setPlaceWhereIsUsed(Place $placeWhereIsUsed = null)
- {
- $this->placeWhereIsUsed = $placeWhereIsUsed;
- return $this;
- }
- /**
- * Gets placeWhereIsUsed
- *
- * @return Place
- */
- public function getPlaceWhereIsUsed()
- {
- return $this->placeWhereIsUsed;
- }
- /**
- * Sets roomWhereIsUsed
- *
- * @param Room $roomWhereIsUsed
- *
- * @return $this
- */
- public function setRoomWhereIsUsed(Room $roomWhereIsUsed = null)
- {
- $this->roomWhereIsUsed = $roomWhereIsUsed;
- return $this;
- }
- /**
- * Gets roomWhereIsUsed
- *
- * @return Room
- */
- public function getRoomWhereIsUsed()
- {
- return $this->roomWhereIsUsed;
- }
- /**
- * Sets additionalStoragePlace.
- *
- * @param string $additionalStoragePlace
- *
- * @return $this
- */
- public function setAdditionalStoragePlace($additionalStoragePlace)
- {
- $this->additionalStoragePlace = $additionalStoragePlace;
- return $this;
- }
- /**
- * Gets additionalStoragePlace.
- *
- * @return string
- */
- public function getAdditionalStoragePlace()
- {
- return $this->additionalStoragePlace;
- }
- /**
- * Sets equipmentList.
- *
- * @param EquipmentList $equipmentList
- *
- * @return $this
- */
- public function setEquipmentList(EquipmentList $equipmentList = null)
- {
- $this->equipmentList = $equipmentList;
- return $this;
- }
- /**
- * Gets equipmentList.
- *
- * @return EquipmentList
- */
- public function getEquipmentList()
- {
- return $this->equipmentList;
- }
- /**
- * Sets skuComplementary.
- *
- * @param string $skuComplementary
- *
- * @return $this
- */
- public function setSkuComplementary($skuComplementary)
- {
- $this->skuComplementary = $skuComplementary;
- return $this;
- }
- /**
- * Gets skuComplementary.
- *
- * @return string
- */
- public function getSkuComplementary()
- {
- return $this->skuComplementary;
- }
- /**
- * Sets tone.
- *
- * @param string $tone
- *
- * @return $this
- */
- public function setTone($tone)
- {
- $this->tone = $tone;
- return $this;
- }
- /**
- * Gets tone.
- *
- * @return string
- */
- public function getTone()
- {
- return $this->tone;
- }
- /**
- * Sets status.
- *
- * @param string $status
- *
- * @return $this
- */
- public function setStatus($status)
- {
- $this->status = $status;
- return $this;
- }
- /**
- * Gets status.
- *
- * @return string
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * Sets supplier.
- *
- * @param Access $supplier
- *
- * @return $this
- */
- public function setSupplier(Access $supplier = null)
- {
- $this->supplier = $supplier;
- return $this;
- }
- /**
- * Gets supplier.
- *
- * @return Access
- */
- public function getSupplier()
- {
- return $this->supplier;
- }
- /**
- * Sets purchasePrice.
- *
- * @param float $purchasePrice
- *
- * @return $this
- */
- public function setPurchasePrice($purchasePrice)
- {
- $this->purchasePrice = floatval($purchasePrice);
- return $this;
- }
- /**
- * Gets purchasePrice.
- *
- * @return float
- */
- public function getPurchasePrice()
- {
- return $this->purchasePrice;
- }
- /**
- * Sets billNumber.
- *
- * @param string $billNumber
- *
- * @return $this
- */
- public function setBillNumber($billNumber)
- {
- $this->billNumber = $billNumber;
- return $this;
- }
- /**
- * Gets billNumber.
- *
- * @return string
- */
- public function getBillNumber()
- {
- return $this->billNumber;
- }
- /**
- * Sets tva.
- *
- * @param float $tva
- *
- * @return $this
- */
- public function setTva($tva)
- {
- $this->tva = floatval($tva);
- return $this;
- }
- /**
- * Gets tva.
- *
- * @return float
- */
- public function getTva()
- {
- return $this->tva;
- }
- /**
- * Sets outCause.
- *
- * @param string $outCause
- *
- * @return $this
- */
- public function setOutCause($outCause)
- {
- $this->outCause = $outCause;
- return $this;
- }
- /**
- * Gets outCause.
- *
- * @return string
- */
- public function getOutCause()
- {
- return $this->outCause;
- }
- /**
- * Sets owner.
- *
- * @param Person person
- *
- * @return $this
- */
- public function setPerson(Person $person = null)
- {
- $this->person = $person;
- return $this;
- }
- /**
- * Gets person.
- *
- * @return Person
- */
- public function getPerson()
- {
- return $this->person;
- }
- /**
- * Sets isComposition
- *
- * @param bool $isComposition
- *
- * @return $this
- */
- public function setIsComposition($isComposition)
- {
- $this->isComposition = $isComposition;
- return $this;
- }
- /**
- * Gets isComposition
- *
- * @return bool
- */
- public function getIsComposition()
- {
- return $this->isComposition;
- }
- /**
- * Sets amount.
- *
- * @param integer $qte
- *
- * @return $this
- */
- public function setQte($qte)
- {
- $this->qte = $qte;
- return $this;
- }
- /**
- * Gets qte.
- *
- * @return integer
- */
- public function getQte()
- {
- if(!$this->isComposition)
- return null;
- return $this->qte;
- }
- /**
- * Sets detailedChecking.
- *
- * @param string $detailedChecking
- *
- * @return $this
- */
- public function setDetailedChecking($detailedChecking)
- {
- $this->detailedChecking = $detailedChecking;
- return $this;
- }
- /**
- * Gets detailedChecking.
- *
- * @return string
- */
- public function getDetailedChecking()
- {
- return $this->detailedChecking;
- }
- /**
- * Sets checking.
- *
- * @param string $checking
- *
- * @return $this
- */
- public function setChecking($checking)
- {
- $this->checking = $checking;
- return $this;
- }
- /**
- * Gets checking.
- *
- * @return string
- */
- public function getChecking()
- {
- return $this->checking;
- }
- /**
- * Sets controlManager.
- *
- * @param Access $controlManager
- *
- * @return $this
- */
- public function setControlManager(Access $controlManager = null)
- {
- $this->controlManager = $controlManager;
- return $this;
- }
- /**
- * Gets controlManager.
- *
- * @return Access
- */
- public function getControlManager()
- {
- return $this->controlManager;
- }
- /**
- * Sets serviceLife.
- *
- * @param integer $serviceLife
- *
- * @return $this
- */
- public function setServiceLife($serviceLife)
- {
- $this->serviceLife = $serviceLife;
- return $this;
- }
- /**
- * Gets serviceLife.
- *
- * @return integer
- */
- public function getServiceLife()
- {
- return $this->serviceLife;
- }
- /**
- * Sets MaxUsedHour.
- *
- * @param integer $maxUsedHour
- *
- * @return $this
- */
- public function setMaxUsedHour($maxUsedHour)
- {
- $this->maxUsedHour = $maxUsedHour;
- return $this;
- }
- /**
- * Gets MaxUsedHour.
- *
- * @return integer
- */
- public function getMaxUsedHour()
- {
- return $this->maxUsedHour;
- }
- /**
- * Sets insurance.
- *
- * @param string $insurance
- *
- * @return $this
- */
- public function setInsurance($insurance)
- {
- $this->insurance = $insurance;
- return $this;
- }
- /**
- * Gets insurance.
- *
- * @return string
- */
- public function getInsurance()
- {
- return $this->insurance;
- }
- /**
- * Sets composer.
- *
- * @param string $composer
- *
- * @return $this
- */
- public function setComposer($composer)
- {
- $this->composer = $composer;
- return $this;
- }
- /**
- * Gets composer.
- *
- * @return string
- */
- public function getComposer()
- {
- return $this->composer;
- }
- /**
- * Sets arranger.
- *
- * @param string $arranger
- *
- * @return $this
- */
- public function setArranger($arranger)
- {
- $this->arranger = $arranger;
- return $this;
- }
- /**
- * Gets arranger.
- *
- * @return string
- */
- public function getArranger()
- {
- return $this->arranger;
- }
- /**
- * Sets referenceEditor.
- *
- * @param string $referenceEditor
- *
- * @return $this
- */
- public function setReferenceEditor($referenceEditor)
- {
- $this->referenceEditor = $referenceEditor;
- return $this;
- }
- /**
- * Gets referenceEditor.
- *
- * @return string
- */
- public function getReferenceEditor()
- {
- return $this->referenceEditor;
- }
- /**
- * Sets origin.
- *
- * @param string $origin
- *
- * @return $this
- */
- public function setOrigin($origin)
- {
- $this->origin = $origin;
- return $this;
- }
- /**
- * Gets origin.
- *
- * @return string
- */
- public function getOrigin()
- {
- return $this->origin;
- }
- /**
- * Sets presenceDriver.
- *
- * @param bool $presenceDriver
- *
- * @return $this
- */
- public function setPresenceDriver($presenceDriver)
- {
- if(!$presenceDriver) $presenceDriver = false;
- $this->presenceDriver = $presenceDriver;
- return $this;
- }
- /**
- * Gets presenceDriver.
- *
- * @return bool
- */
- public function getPresenceDriver()
- {
- return $this->presenceDriver;
- }
- /**
- * Sets editor.
- *
- * @param Access $editor
- *
- * @return $this
- */
- public function setEditor(Access $editor = null)
- {
- $this->editor = $editor;
- return $this;
- }
- /**
- * Gets editor.
- *
- * @return Access
- */
- public function getEditor()
- {
- return $this->editor;
- }
- /**
- * Sets band.
- *
- * @param string $band
- *
- * @return $this
- */
- public function setBand($band)
- {
- $this->band = $band;
- return $this;
- }
- /**
- * Gets band.
- *
- * @return string
- */
- public function getBand()
- {
- return $this->band;
- }
- /**
- * Sets style.
- *
- * @param string $style
- *
- * @return $this
- */
- public function setStyle($style)
- {
- $this->style = $style;
- return $this;
- }
- /**
- * Gets style.
- *
- * @return string
- */
- public function getStyle()
- {
- return $this->style;
- }
- /**
- * Sets duration.
- *
- * @param int $duration
- *
- * @return $this
- */
- public function setDuration($duration)
- {
- $this->duration = $duration;
- return $this;
- }
- /**
- * Gets duration.
- *
- * @return int
- */
- public function getDuration()
- {
- return $this->duration;
- }
- /**
- * Sets difficulty.
- *
- * @param string $difficulty
- *
- * @return $this
- */
- public function setDifficulty($difficulty)
- {
- $this->difficulty = $difficulty;
- return $this;
- }
- /**
- * Gets difficulty.
- *
- * @return string
- */
- public function getDifficulty()
- {
- return $this->difficulty;
- }
- /**
- * Adds instrumentOrVoice.
- *
- * @param EquipmentList $instrumentOrVoice
- *
- * @return $this
- */
- public function addInstrumentOrVoice($instrumentOrVoice)
- {
- $this->instrumentOrVoice[] = $instrumentOrVoice;
- return $this;
- }
- /**
- * Removes instrumentOrVoice.
- *
- * @param EquipmentList $instrumentOrVoice
- *
- * @return $this
- */
- public function removeInstrumentOrVoice($instrumentOrVoice)
- {
- $this->instrumentOrVoice->removeElement($instrumentOrVoice);
- return $this;
- }
- /**
- * Gets instrumentOrVoice.
- *
- * @return ArrayCollection<MaterialList>
- */
- public function getInstrumentOrVoice()
- {
- return array_values($this->instrumentOrVoice->toArray());
- }
- /**
- * Gets breakingLoad.
- *
- * @return integer
- */
- public function getBreakingLoad()
- {
- return $this->breakingLoad;
- }
- /**
- * Sets breakingLoad.
- *
- * @param integer $breakingLoad
- *
- * @return $this
- */
- public function setBreakingLoad($breakingLoad)
- {
- $this->breakingLoad = $breakingLoad;
- return $this;
- }
- /**
- * Gets mua.
- *
- * @return integer
- */
- public function getMua()
- {
- return $this->mua;
- }
- /**
- * Sets mua.
- *
- * @param integer $mua
- *
- * @return $this
- */
- public function setMua($mua)
- {
- $this->mua = $mua;
- return $this;
- }
- /**
- * Gets cmu.
- *
- * @return integer
- */
- public function getCmu()
- {
- return $this->cmu;
- }
- /**
- * Sets cmu.
- *
- * @param integer $cmu
- *
- * @return $this
- */
- public function setCmu($cmu)
- {
- $this->cmu = $cmu;
- return $this;
- }
- /**
- * Gets cmr.
- *
- * @return integer
- */
- public function getCmr()
- {
- return $this->cmr;
- }
- /**
- * Sets cmr.
- *
- * @param integer $cmr
- *
- * @return $this
- */
- public function setCmr($cmr)
- {
- $this->cmr = $cmr;
- return $this;
- }
- /**
- * Gets verticalEffort.
- *
- * @return integer
- */
- public function getVerticalEffort()
- {
- return $this->verticalEffort;
- }
- /**
- * Sets verticalEffort.
- *
- * @param integer $verticalEffort
- *
- * @return $this
- */
- public function setVerticalEffort($verticalEffort)
- {
- $this->verticalEffort = $verticalEffort;
- return $this;
- }
- /**
- * Gets horizontalEffort.
- *
- * @return integer
- */
- public function getHorizontalEffort()
- {
- return $this->horizontalEffort;
- }
- /**
- * Sets horizontalEffort.
- *
- * @param integer $horizontalEffort
- *
- * @return $this
- */
- public function setHorizontalEffort($horizontalEffort)
- {
- $this->horizontalEffort = $horizontalEffort;
- return $this;
- }
- /**
- * @param EquipmentComposition $equipmentComposition
- * @return $this
- */
- public function addEquipmentComposition(EquipmentComposition $equipmentComposition)
- {
- $equipmentComposition->setParent($this);
- $this->equipmentComposition[] = $equipmentComposition;
- return $this;
- }
- /**
- * @return ArrayCollection
- */
- public function getEquipmentComposition()
- {
- return $this->equipmentComposition;
- }
- /**
- * Remove $equipmentComposition
- *
- * @param \AppBundle\Entity\Product\EquipmentComposition $equipmentComposition
- */
- public function removeEquipmentComposition(EquipmentComposition $equipmentComposition)
- {
- $this->equipmentComposition->removeElement($equipmentComposition);
- }
- /**
- * @param EquipmentRepair $equipmentRepair
- * @return $this
- */
- public function addEquipmentRepair(EquipmentRepair $equipmentRepair)
- {
- $equipmentRepair->setEquipment($this);
- $this->equipmentRepair[] = $equipmentRepair;
- return $this;
- }
- /**
- * @return ArrayCollection
- */
- public function getEquipmentRepair()
- {
- return $this->equipmentRepair;
- }
- /**
- * Remove equipmentRepair
- *
- * @param \AppBundle\Entity\Product\EquipmentRepair $equipmentRepair
- */
- public function removeEquipmentRepair(EquipmentRepair $equipmentRepair)
- {
- $this->equipmentRepair->removeElement($equipmentRepair);
- }
- /**
- * @param EquipmentControl $equipmentControl
- * @return $this
- */
- public function addEquipmentControl(EquipmentControl $equipmentControl)
- {
- $equipmentControl->setEquipment($this);
- $this->equipmentControl[] = $equipmentControl;
- return $this;
- }
- /**
- * @return ArrayCollection
- */
- public function getEquipmentControl()
- {
- return $this->equipmentControl;
- }
- /**
- * Remove equipmentControl
- *
- * @param \AppBundle\Entity\Product\EquipmentControl $equipmentControl
- */
- public function removeEquipmentControl(\AppBundle\Entity\Product\EquipmentControl $equipmentControl)
- {
- $this->equipmentControl->removeElement($equipmentControl);
- }
- /**
- * @param EquipmentLoan $equipmentLoan
- * @return $this
- */
- public function addEquipmentLoan(EquipmentLoan $equipmentLoan)
- {
- $equipmentLoan->setEquipment($this);
- $this->equipmentLoan[] = $equipmentLoan;
- return $this;
- }
- /**
- * @return ArrayCollection
- */
- public function getEquipmentLoan()
- {
- return $this->equipmentLoan;
- }
- /**
- * Remove equipmentLoan
- *
- * @param \AppBundle\Entity\Product\EquipmentLoan $equipmentLoan
- */
- public function removeEquipmentLoan(EquipmentLoan $equipmentLoan)
- {
- $this->equipmentLoan->removeElement($equipmentLoan);
- }
- /**
- * Get equipmentLoans
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getEquipmentLoanFiltered()
- {
- $filtered = array_filter($this->equipmentLoan->toArray(), function($equipmentLoansFiltered) {
- return is_null($equipmentLoansFiltered->getEndDate());
- });
- $filteredArray = new ArrayCollection(array_values($filtered));
- return $filteredArray;
- }
- /**
- * Set theoreticalServiceLifeControl
- *
- * @param integer $theoreticalServiceLifeControl
- *
- * @return Equipment
- */
- public function setTheoreticalServiceLifeControl($theoreticalServiceLifeControl)
- {
- $this->theoreticalServiceLifeControl = $theoreticalServiceLifeControl;
- return $this;
- }
- /**
- * Get theoreticalServiceLifeControl
- *
- * @return integer
- */
- public function getTheoreticalServiceLifeControl()
- {
- return $this->theoreticalServiceLifeControl;
- }
- /**
- * Set maximumDurationOfUseControl
- *
- * @param integer $maximumDurationOfUseControl
- *
- * @return Equipment
- */
- public function setMaximumDurationOfUseControl($maximumDurationOfUseControl)
- {
- $this->maximumDurationOfUseControl = $maximumDurationOfUseControl;
- return $this;
- }
- /**
- * Get maximumDurationOfUseControl
- *
- * @return integer
- */
- public function getMaximumDurationOfUseControl()
- {
- return $this->maximumDurationOfUseControl;
- }
- /**
- * Set periodicityControl
- *
- * @param string $periodicityControl
- *
- * @return Equipment
- */
- public function setPeriodicityControl($periodicityControl)
- {
- $this->periodicityControl = $periodicityControl;
- return $this;
- }
- /**
- * Get periodicityControl
- *
- * @return string
- */
- public function getPeriodicityControl()
- {
- return $this->periodicityControl;
- }
- /**
- * Set managerControl
- *
- * @param \AppBundle\Entity\AccessAndFunction\Access $managerControl
- *
- * @return Equipment
- */
- public function setManagerControl(\AppBundle\Entity\AccessAndFunction\Access $managerControl = null)
- {
- $this->managerControl = $managerControl;
- return $this;
- }
- /**
- * Get managerControl
- *
- * @return \AppBundle\Entity\AccessAndFunction\Access
- */
- public function getManagerControl()
- {
- return $this->managerControl;
- }
- /**
- * Gets full label.
- *
- * @return array
- */
- public function getFullLabelTemplate()
- {
- $fullLabel = [];
- if(!empty($this->getEquipmentList())){
- $fullLabel[] = ['value' => $this->getEquipmentList()->getFamilly(), 'translate' => true];
- $fullLabel[] = ['value' => $this->getEquipmentList()->getCategory(), 'translate' => true];
- }
- $fullLabel[] = $this->getName();
- $fullLabel[] = $this->getBrand();
- $fullLabel[] = $this->getModel();
- return $fullLabel;
- }
- /**
- * Set isSamePlaceToStockAndUsed
- *
- * @param boolean $isSamePlaceToStockAndUsed
- *
- * @return Equipment
- */
- public function setIsSamePlaceToStockAndUsed($isSamePlaceToStockAndUsed)
- {
- $this->isSamePlaceToStockAndUsed = $isSamePlaceToStockAndUsed;
- return $this;
- }
- /**
- * Get isSamePlaceToStockAndUsed
- *
- * @return boolean
- */
- public function getIsSamePlaceToStockAndUsed()
- {
- return $this->isSamePlaceToStockAndUsed;
- }
- /**
- * Set isbn
- *
- * @param string $isbn
- *
- * @return Equipment
- */
- public function setIsbn($isbn)
- {
- $this->isbn = $isbn;
- return $this;
- }
- /**
- * Get isbn
- *
- * @return string
- */
- public function getIsbn()
- {
- return $this->isbn;
- }
- /**
- * Sets duration.
- *
- * @param \DateTime $durationTime
- *
- * @return $this
- */
- public function setDurationTime($durationTime)
- {
- $this->durationTime = $durationTime;
- return $this;
- }
- /**
- * Gets duration.
- *
- * @return \DateTime
- */
- public function getDurationTime()
- {
- return $this->durationTime ? $this->durationTime->format('H:i:s') : $this->durationTime;
- }
- }
|