<?php
namespace App\Entity;
/**
* RookieSchoolClass
*/
class RookieSchoolClass {
/**
* @var int
*/
private $id;
/**
* @var string|null
*/
private $name;
/**
* @var \App\Entity\RookieSchool
*/
private $school;
/**
* Get id.
*
* @return int
*/
public function getId() {
return $this->id;
}
/**
* Set name.
*
* @param string|null $name
*
* @return RookieSchoolClass
*/
public function setName($name = null) {
$this->name = $name;
return $this;
}
/**
* Get name.
*
* @return string|null
*/
public function getName() {
return $this->name;
}
/**
* Set school.
*
* @param \App\Entity\RookieSchool|null $school
*
* @return RookieSchoolClass
*/
public function setSchool(\App\Entity\RookieSchool $school = null) {
$this->school = $school;
return $this;
}
/**
* Get school.
*
* @return \App\Entity\RookieSchool|null
*/
public function getSchool() {
return $this->school;
}
public function getText() {
$schoolName = $this->school->getName();
$className = $this->name;
return "$schoolName - $className";
}
}