<?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#_Toc480452010
*
* Class OneRosterClass
* @package Cms\CoreBundle\Entity\OneRoster
*
* @ORM\Entity(
* repositoryClass = "Cms\CoreBundle\Doctrine\OneRoster\OneRosterClassRepository"
* )
*/
class OneRosterClass extends AbstractOneRosterEntity
{
const ONEROSTER_TYPE = 'class';
const DISCR = 'Class';
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = false,
* )
*/
protected ?string $title = null;
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = true,
* )
*/
protected ?string $classCode = null;
/**
* @see https://www.imsglobal.org/oneroster-v11-final-specification#_Toc480452021
*
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = false,
* )
*/
protected ?string $classType = null;
/**
* @see https://ceds.ed.gov/CEDSElementDetails.aspx?TermId=7100
*
* @var array|string[]
*
* @ORM\Column(
* type = "json",
* nullable = false,
* )
*/
protected array $grades = [];
/**
* @var array|array[]|null
*
* @ORM\Column(
* type = "json",
* nullable = false,
* )
*/
protected ?array $course = null;
/**
* @var array|array[]|null
*
* @ORM\Column(
* type = "json",
* nullable = false,
* )
*/
protected ?array $school = null;
/**
* @var array|array[]
*
* @ORM\Column(
* type = "json",
* nullable = false,
* )
*/
protected array $terms = [];
/**
* @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 string|null
*/
public function getClassCode(): ?string
{
return $this->classCode;
}
/**
* @param string|null $value
* @return $this
*/
public function setClassCode(?string $value): self
{
$this->classCode = $value;
return $this;
}
/**
* @return string|null
*/
public function getClassType(): ?string
{
return $this->classType;
}
/**
* @param string $value
* @return $this
*/
public function setClassType(string $value): self
{
$this->classType = $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 getCourse(): ?array
{
return $this->course;
}
/**
* @param array|array[] $value
* @return $this
*/
public function setCourse(array $value): self
{
$this->course = $this->parseGuidRef($value);
return $this;
}
/**
* @return array|array[]|null
*/
public function getSchool(): ?array
{
return $this->school;
}
/**
* @param array|array[] $value
* @return $this
*/
public function setSchool(array $value): self
{
$this->school = $this->parseGuidRef($value);
return $this;
}
/**
* @return array|array[]
*/
public function getTerms(): array
{
return $this->terms;
}
/**
* @param array|array[] $value
* @return $this
*/
public function setTerms(array $value): self
{
$this->terms = $this->parseGuidRefs($value);
return $this;
}
}