src/Cms/CoreBundle/Entity/OneRoster/OneRosterCourse.php line 19

Open in your IDE?
  1. <?php
  2. namespace Cms\CoreBundle\Entity\OneRoster;
  3. use Cms\CoreBundle\Entity\AbstractOneRosterEntity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @see https://www.imsglobal.org/oneroster-v11-final-specification#_Toc480452011
  7.  *
  8.  * Class OneRosterCourse
  9.  * @package Cms\CoreBundle\Entity\OneRoster
  10.  *
  11.  * @ORM\Entity(
  12.  *     repositoryClass = "Cms\CoreBundle\Doctrine\OneRoster\OneRosterCourseRepository"
  13.  * )
  14.  */
  15. class OneRosterCourse extends AbstractOneRosterEntity
  16. {
  17.     const ONEROSTER_TYPE 'course';
  18.     const DISCR 'Course';
  19.     /**
  20.      * @var string|null
  21.      *
  22.      * @ORM\Column(
  23.      *     type = "string",
  24.      *     nullable = false,
  25.      * )
  26.      */
  27.     protected ?string $title null;
  28.     /**
  29.      * NOTE: this is called school year, but really points to an academic session object
  30.      * IMPORTANT: we had to rename the database column for this due to naming conflicts with other schoolYear value in another object!
  31.      *
  32.      * @var array|array[]|null
  33.      *
  34.      * @ORM\Column(
  35.      *     name = "schoolSession",
  36.      *     type = "json",
  37.      *     nullable = true,
  38.      * )
  39.      */
  40.     protected ?array $schoolYear null;
  41.     /**
  42.      * @var string|null
  43.      *
  44.      * @ORM\Column(
  45.      *     type = "string",
  46.      *     nullable = true,
  47.      * )
  48.      */
  49.     protected ?string $courseCode;
  50.     /**
  51.      * @see https://ceds.ed.gov/CEDSElementDetails.aspx?TermId=7100
  52.      *
  53.      * @var array|string[]
  54.      *
  55.      * @ORM\Column(
  56.      *     type = "json",
  57.      *     nullable = false,
  58.      * )
  59.      */
  60.     protected array $grades = [];
  61.     /**
  62.      * @var array|array[]
  63.      *
  64.      * @ORM\Column(
  65.      *     type = "json",
  66.      *     nullable = false,
  67.      * )
  68.      */
  69.     protected ?array $org null;
  70.     /**
  71.      * @return string|null
  72.      */
  73.     public function getTitle(): ?string
  74.     {
  75.         return $this->title;
  76.     }
  77.     /**
  78.      * @param string $value
  79.      * @return $this
  80.      */
  81.     public function setTitle(string $value): self
  82.     {
  83.         $this->title $value;
  84.         return $this;
  85.     }
  86.     /**
  87.      * @return array|null
  88.      */
  89.     public function getSchoolYear(): ?array
  90.     {
  91.         return $this->schoolYear;
  92.     }
  93.     /**
  94.      * @param array|array[]|null $value
  95.      * @return $this
  96.      */
  97.     public function setSchoolYear(?array $value): self
  98.     {
  99.         $this->schoolYear = ($value) ? $this->parseGuidRef($value) : null;
  100.         return $this;
  101.     }
  102.     /**
  103.      * @return string|null
  104.      */
  105.     public function getCourseCode(): ?string
  106.     {
  107.         return $this->courseCode;
  108.     }
  109.     /**
  110.      * @param string|null $value
  111.      * @return $this
  112.      */
  113.     public function setCourseCode(?string $value): self
  114.     {
  115.         $this->courseCode $value;
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return array|string[]
  120.      */
  121.     public function getGrades(): array
  122.     {
  123.         return $this->grades;
  124.     }
  125.     /**
  126.      * @param array|string[] $value
  127.      * @return $this
  128.      */
  129.     public function setGrades(array $value): self
  130.     {
  131.         $this->grades $this->parseArray($value);
  132.         return $this;
  133.     }
  134.     /**
  135.      * @return array|array[]|null
  136.      */
  137.     public function getOrg(): ?array
  138.     {
  139.         return $this->org;
  140.     }
  141.     /**
  142.      * @param array|array[] $value
  143.      * @return $this
  144.      */
  145.     public function setOrg(array $value): self
  146.     {
  147.         $this->org $this->parseGuidRef($value);
  148.         return $this;
  149.     }
  150. }