src/Cms/CoreBundle/Entity/OneRoster/OneRosterClass.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#_Toc480452010
  7.  *
  8.  * Class OneRosterClass
  9.  * @package Cms\CoreBundle\Entity\OneRoster
  10.  *
  11.  * @ORM\Entity(
  12.  *     repositoryClass = "Cms\CoreBundle\Doctrine\OneRoster\OneRosterClassRepository"
  13.  * )
  14.  */
  15. class OneRosterClass extends AbstractOneRosterEntity
  16. {
  17.     const ONEROSTER_TYPE 'class';
  18.     const DISCR 'Class';
  19.     /**
  20.      * @var string|null
  21.      *
  22.      * @ORM\Column(
  23.      *     type = "string",
  24.      *     nullable = false,
  25.      * )
  26.      */
  27.     protected ?string $title null;
  28.     /**
  29.      * @var string|null
  30.      *
  31.      * @ORM\Column(
  32.      *     type = "string",
  33.      *     nullable = true,
  34.      * )
  35.      */
  36.     protected ?string $classCode null;
  37.     /**
  38.      * @see https://www.imsglobal.org/oneroster-v11-final-specification#_Toc480452021
  39.      *
  40.      * @var string|null
  41.      *
  42.      * @ORM\Column(
  43.      *     type = "string",
  44.      *     nullable = false,
  45.      * )
  46.      */
  47.     protected ?string $classType null;
  48.     /**
  49.      * @see https://ceds.ed.gov/CEDSElementDetails.aspx?TermId=7100
  50.      *
  51.      * @var array|string[]
  52.      *
  53.      * @ORM\Column(
  54.      *     type = "json",
  55.      *     nullable = false,
  56.      * )
  57.      */
  58.     protected array $grades = [];
  59.     /**
  60.      * @var array|array[]|null
  61.      *
  62.      * @ORM\Column(
  63.      *     type = "json",
  64.      *     nullable = false,
  65.      * )
  66.      */
  67.     protected ?array $course null;
  68.     /**
  69.      * @var array|array[]|null
  70.      *
  71.      * @ORM\Column(
  72.      *     type = "json",
  73.      *     nullable = false,
  74.      * )
  75.      */
  76.     protected ?array $school null;
  77.     /**
  78.      * @var array|array[]
  79.      *
  80.      * @ORM\Column(
  81.      *     type = "json",
  82.      *     nullable = false,
  83.      * )
  84.      */
  85.     protected array $terms = [];
  86.     /**
  87.      * @return string|null
  88.      */
  89.     public function getTitle(): ?string
  90.     {
  91.         return $this->title;
  92.     }
  93.     /**
  94.      * @param string $value
  95.      * @return $this
  96.      */
  97.     public function setTitle(string $value): self
  98.     {
  99.         $this->title $value;
  100.         return $this;
  101.     }
  102.     /**
  103.      * @return string|null
  104.      */
  105.     public function getClassCode(): ?string
  106.     {
  107.         return $this->classCode;
  108.     }
  109.     /**
  110.      * @param string|null $value
  111.      * @return $this
  112.      */
  113.     public function setClassCode(?string $value): self
  114.     {
  115.         $this->classCode $value;
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return string|null
  120.      */
  121.     public function getClassType(): ?string
  122.     {
  123.         return $this->classType;
  124.     }
  125.     /**
  126.      * @param string $value
  127.      * @return $this
  128.      */
  129.     public function setClassType(string $value): self
  130.     {
  131.         $this->classType $value;
  132.         return $this;
  133.     }
  134.     /**
  135.      * @return array|string[]
  136.      */
  137.     public function getGrades(): array
  138.     {
  139.         return $this->grades;
  140.     }
  141.     /**
  142.      * @param array|string[] $value
  143.      * @return $this
  144.      */
  145.     public function setGrades(array $value): self
  146.     {
  147.         $this->grades $this->parseArray($value);
  148.         return $this;
  149.     }
  150.     /**
  151.      * @return array|array[]|null
  152.      */
  153.     public function getCourse(): ?array
  154.     {
  155.         return $this->course;
  156.     }
  157.     /**
  158.      * @param array|array[] $value
  159.      * @return $this
  160.      */
  161.     public function setCourse(array $value): self
  162.     {
  163.         $this->course $this->parseGuidRef($value);
  164.         return $this;
  165.     }
  166.     /**
  167.      * @return array|array[]|null
  168.      */
  169.     public function getSchool(): ?array
  170.     {
  171.         return $this->school;
  172.     }
  173.     /**
  174.      * @param array|array[] $value
  175.      * @return $this
  176.      */
  177.     public function setSchool(array $value): self
  178.     {
  179.         $this->school $this->parseGuidRef($value);
  180.         return $this;
  181.     }
  182.     /**
  183.      * @return array|array[]
  184.      */
  185.     public function getTerms(): array
  186.     {
  187.         return $this->terms;
  188.     }
  189.     /**
  190.      * @param array|array[] $value
  191.      * @return $this
  192.      */
  193.     public function setTerms(array $value): self
  194.     {
  195.         $this->terms $this->parseGuidRefs($value);
  196.         return $this;
  197.     }
  198. }