src/Entity/RookieSchoolClass.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. /**
  4.  * RookieSchoolClass
  5.  */
  6. class RookieSchoolClass {
  7.     /**
  8.      * @var int
  9.      */
  10.     private $id;
  11.     /**
  12.      * @var string|null
  13.      */
  14.     private $name;
  15.     /**
  16.      * @var \App\Entity\RookieSchool
  17.      */
  18.     private $school;
  19.     /**
  20.      * Get id.
  21.      *
  22.      * @return int
  23.      */
  24.     public function getId() {
  25.         return $this->id;
  26.     }
  27.     /**
  28.      * Set name.
  29.      *
  30.      * @param string|null $name
  31.      *
  32.      * @return RookieSchoolClass
  33.      */
  34.     public function setName($name null) {
  35.         $this->name $name;
  36.         return $this;
  37.     }
  38.     /**
  39.      * Get name.
  40.      *
  41.      * @return string|null
  42.      */
  43.     public function getName() {
  44.         return $this->name;
  45.     }
  46.     /**
  47.      * Set school.
  48.      *
  49.      * @param \App\Entity\RookieSchool|null $school
  50.      *
  51.      * @return RookieSchoolClass
  52.      */
  53.     public function setSchool(\App\Entity\RookieSchool $school null) {
  54.         $this->school $school;
  55.         return $this;
  56.     }
  57.     /**
  58.      * Get school.
  59.      *
  60.      * @return \App\Entity\RookieSchool|null
  61.      */
  62.     public function getSchool() {
  63.         return $this->school;
  64.     }
  65.     public function getText() {
  66.         $schoolName $this->school->getName();
  67.         $className $this->name;
  68.         return "$schoolName - $className";
  69.     }
  70. }