| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?php
- namespace AppBundle\Entity\Education;
- use AppBundle\Entity\AccessAndFunction\Access;
- use AppBundle\Entity\Organization\Organization;
- use AppBundle\Entity\Traits\ActivityPeriodTrait;
- 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;
- /**
- * Période de droit de saisir des notes pour un Access et une Education
- *
- * @Iri("http://schema.org/SeizurePeriodNotation")
- */
- #[ORM\Entity]
- class SeizurePeriodNotation
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- use ActivityPeriodTrait;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['seizureperiodnotation'])]
- private $id;
- /**
- * @var EducationTeacher
- */
- #[ORM\ManyToOne(targetEntity: 'EducationTeacher', inversedBy: 'seizurePeriodNotations')]
- #[Groups(['seizureperiodnotation'])]
- private $educationTeacher;
- /**
- * @var string
- */
- #[Groups(['seizureperiodnotation'])]
- 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;
- }
- /**
- * Set educationTeacher
- *
- * @param \AppBundle\Entity\Education\EducationTeacher $educationTeacher
- *
- * @return SeizurePeriodNotation
- */
- public function setEducationTeacher(\AppBundle\Entity\Education\EducationTeacher $educationTeacher)
- {
- $this->educationTeacher = $educationTeacher;
- return $this;
- }
- /**
- * Get educationTeacher
- *
- * @return \AppBundle\Entity\Education\EducationTeacher
- */
- public function getEducationTeacher()
- {
- return $this->educationTeacher;
- }
- /**
- * Gets full label.
- *
- * @return string
- */
- public function getFullLabelTemplate()
- {
- $startDate = new \DateTime($this->getStartDate());
- $endDate = new \DateTime($this->getEndDate());
- return [
- $startDate->format('d-m-Y'),
- 'to',
- $endDate->format('d-m-Y')
- ];
- }
- }
|