<?php
namespace Cms\CoreBundle\Entity\OneRoster;
use Cms\CoreBundle\Entity\AbstractOneRosterEntity;
use Doctrine\ORM\Mapping as ORM;
/**
* @see https://www.imsglobal.org/oneroster-v11-final-specification#_Toc480452011
*
* Class OneRosterCourse
* @package Cms\CoreBundle\Entity\OneRoster
*
* @ORM\Entity(
* repositoryClass = "Cms\CoreBundle\Doctrine\OneRoster\OneRosterCourseRepository"
* )
*/
class OneRosterCourse extends AbstractOneRosterEntity
{
const ONEROSTER_TYPE = 'course';
const DISCR = 'Course';
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = false,
* )
*/
protected ?string $title = null;
/**
* NOTE: this is called school year, but really points to an academic session object
* IMPORTANT: we had to rename the database column for this due to naming conflicts with other schoolYear value in another object!
*
* @var array|array[]|null
*
* @ORM\Column(
* name = "schoolSession",
* type = "json",
* nullable = true,
* )
*/
protected ?array $schoolYear = null;
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = true,
* )
*/
protected ?string $courseCode;
/**
* @see https://ceds.ed.gov/CEDSElementDetails.aspx?TermId=7100
*
* @var array|string[]
*
* @ORM\Column(
* type = "json",
* nullable = false,
* )
*/
protected array $grades = [];
/**
* @var array|array[]
*
* @ORM\Column(
* type = "json",
* nullable = false,
* )
*/
protected ?array $org = null;
/**
* @return string|null
*/
public function getTitle(): ?string
{
return $this->title;
}
/**
* @param string $value
* @return $this
*/
public function setTitle(string $value): self
{
$this->title = $value;
return $this;
}
/**
* @return array|null
*/
public function getSchoolYear(): ?array
{
return $this->schoolYear;
}
/**
* @param array|array[]|null $value
* @return $this
*/
public function setSchoolYear(?array $value): self
{
$this->schoolYear = ($value) ? $this->parseGuidRef($value) : null;
return $this;
}
/**
* @return string|null
*/
public function getCourseCode(): ?string
{
return $this->courseCode;
}
/**
* @param string|null $value
* @return $this
*/
public function setCourseCode(?string $value): self
{
$this->courseCode = $value;
return $this;
}
/**
* @return array|string[]
*/
public function getGrades(): array
{
return $this->grades;
}
/**
* @param array|string[] $value
* @return $this
*/
public function setGrades(array $value): self
{
$this->grades = $this->parseArray($value);
return $this;
}
/**
* @return array|array[]|null
*/
public function getOrg(): ?array
{
return $this->org;
}
/**
* @param array|array[] $value
* @return $this
*/
public function setOrg(array $value): self
{
$this->org = $this->parseGuidRef($value);
return $this;
}
}