true])] #[Assert\Type(type: 'boolean')] #[Assert\NotNull] #[Groups(['organizationfunction', 'organization_function_edit'])] private $isMemberSection = true; /** * @var string * @ExportSplitFields({"functionType.mission","startDate","endDate"}) */ #[Groups(['template'])] private $fullLabelTemplate; /** * Sets id. * * @param int $id * * @return $this */ public function setId($id) { $this->id = $id; return $this; } /** * Gets id. * * @return int */ public function getId() { return $this->id; } /** * Sets functionType. * * @param string $functionType * * @return $this */ public function setFunctionType($functionType) { $this->functionType = $functionType; return $this; } /** * Get functionType * * @return \AppBundle\Entity\AccessAndFunction\FunctionType */ public function getFunctionType() { return $this->functionType; } /** * Sets functionComplement. * * @param string $functionComplement * * @return $this */ public function setFunctionComplement($functionComplement) { $this->functionComplement = $functionComplement; return $this; } /** * Gets functionComplement. * * @return string */ public function getFunctionComplement() { return $this->functionComplement; } /** * Sets departureCause. * * @param string $departureCause * * @return $this */ public function setDepartureCause($departureCause) { $this->departureCause = $departureCause; return $this; } /** * Gets departureCause. * * @return string */ public function getDepartureCause() { return $this->departureCause; } /** * Sets activity. * * @param Activity $activity * * @return $this */ public function setActivity(Activity $activity = null) { $this->activity = $activity; return $this; } /** * Gets activity. * * @return Activity */ public function getActivity() { return $this->activity; } /** * Set access * * @param \AppBundle\Entity\AccessAndFunction\Access $access * * @return OrganizationFunction */ 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; } /** * Sets isMemberSection. * * @param bool $isMemberSection * * @return $this */ public function setIsPhysical($isMemberSection) { $this->isMemberSection = $isMemberSection; return $this; } /** * Gets isMemberSection. * * @return bool */ public function getIsPhysical() { return $this->isMemberSection; } /** * Set isMemberSection * * @param boolean $isMemberSection * * @return OrganizationFunction */ public function setIsMemberSection($isMemberSection) { $this->isMemberSection = $isMemberSection; return $this; } /** * Get isMemberSection * * @return boolean */ public function getIsMemberSection() { return $this->isMemberSection; } /** * @return array * @throws \Exception */ public function getFullLabelTemplate() { $startDate = new \DateTime($this->getStartDate()); $fullLabelTemplate = [ ['value' => $this->getFunctionType()->getMission(), 'translate' => true], $startDate->format('d-m-Y') ]; if(!empty($this->getEndDate())){ $endDate = new \DateTime($this->getEndDate()); $fullLabelTemplate[] = $endDate->format('d-m-Y'); } return $fullLabelTemplate; } }