| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace AppBundle\Entity\Traits;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- /**
- * @Iri("http://schema.org/Generic")
- */
- trait ActivityYearTrait
- {
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Groups(['educationstudent', 'access_details_educationstudent', 'report_card_educationstudent', 'student_registration_educationstudent', 'educationnotation_list_educationstudent', 'edu_stu_courses_courses', 'education_input_list', 'education_student_next_year', 'online_registration_access_details_educationstudent', 'education_student_next_year_educationstudentlastyear', 'organization_cotisation_steps_cotisationbyyears'])]
- private $startYear;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Groups(['educationstudent', 'access_details_educationstudent', 'report_card_educationstudent', 'student_registration_educationstudent'])]
- private $endYear;
-
- /**
- * Gets start year
- *
- * @return int
- */
- public function getStartYear() {
- return $this->startYear;
- }
-
- /**
- * Sets start year
- *
- * @param int $startYear
- * @return $this
- */
- public function setStartYear($startYear = null) {
- if($startYear == null) $startYear = date('Y');
- $this->startYear = $startYear;
- return $this;
- }
- /**
- * Gets end year
- *
- * @return int
- */
- public function getEndYear() {
- return $this->endYear;
- }
- /**
- * Sets end year
- *
- * @param int $endYear
- * @return $this
- */
- public function setEndYear($endYear) {
- $this->endYear = $endYear;
- return $this;
- }
- }
|