*/ #[Assert\Valid] #[ORM\OneToMany(targetEntity: 'BillingIntangibleExcludeDate', mappedBy: 'accessIntangible', cascade: ['persist'], orphanRemoval: true)] #[Groups(['accessintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles'])] private $billingIntangibleExcludeDates; /** * @var float */ #[ORM\Column(type: 'float', nullable: true)] #[Assert\Type(type: 'float')] #[Groups(['accessintangible', 'educationalprojectintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles'])] private $unitPrice; /** * Constructor */ public function __construct() { parent::__construct(); $this->billingIntangibleExcludeDates = new ArrayCollection(); } /** * Set access * * @param \AppBundle\Entity\AccessAndFunction\Access $access * * @return AccessIntangible */ public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access) { $this->access = $access; return $this; } /** * Get access * * @return \AppBundle\Entity\AccessAndFunction\Access */ public function getAccess() { return $this->access; } /** * 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 AccessIntangible */ 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 AccessIntangible */ public function setUnitPrice($unitPrice) { $this->unitPrice = floatval($unitPrice); return $this; } /** * Get unitPrice * * @return float */ public function getUnitPrice() { return $this->unitPrice; } }