*/ #[Assert\Valid] #[ORM\OneToMany(targetEntity: 'BillingIntangibleExcludeDate', mappedBy: 'educationalProjectIntangible', cascade: ['persist'], orphanRemoval: true)] #[Groups(['accessintangible'])] private $billingIntangibleExcludeDates; /** * @var float */ #[ORM\Column(type: 'float', nullable: true)] #[Assert\Type(type: 'float')] #[Groups(['educationalprojectintangible'])] private $unitPrice; /** * Constructor */ public function __construct() { parent::__construct(); $this->billingIntangibleExcludeDates = new ArrayCollection(); } /** * Set educationalProject * * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject * * @return EducationalProjectIntangible */ public function setEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject) { $this->educationalProject = $educationalProject; return $this; } /** * Get educationalProject * * @return \AppBundle\Entity\Booking\EducationalProject */ public function getEducationalProject() { return $this->educationalProject; } /** * applyLock */ public function applyLock() { // if(!is_null($this->getExcludeRule()) && $this->getIntangible()->getBillingPeriodicityType() === PeriodicityTypeEnum::PUNCTUAL){ // $this->setLockable(true); // } } public function adminCanChange(){ return false; } /** * Add billingIntangibleExcludeDate * * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate * * @return EducationalProjectIntangible */ public function addBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate) { $this->billingIntangibleExcludeDates[] = $billingIntangibleExcludeDate; return $this; } /** * Remove billingIntangibleExcludeDate * * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate */ public function removeBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate) { $this->billingIntangibleExcludeDates->removeElement($billingIntangibleExcludeDate); } /** * Get billingIntangibleExcludeDates * * @return \Doctrine\Common\Collections\Collection */ public function getBillingIntangibleExcludeDates() { return $this->billingIntangibleExcludeDates; } /** * Set unitPrice * * @param float $unitPrice * * @return EducationalProjectIntangible */ public function setUnitPrice($unitPrice) { $this->unitPrice = floatval($unitPrice); return $this; } /** * Get unitPrice * * @return float */ public function getUnitPrice() { return $this->unitPrice; } }