- <?php
- namespace NoteBundle\Form\Model;
- use CoreBundle\Entity\Branche;
- use CoreBundle\Entity\GroupStudent;
- use CoreBundle\Entity\Module;
- use CoreBundle\Entity\Periode;
- use CoreBundle\Entity\Secteur;
- class AppelModel implements \JsonSerializable
- {
-     /**
-      * @var Branche
-      */
-     private $branche;
-     /**
-      * @var Secteur
-      */
-     private $secteur;
-     /**
-      * @var GroupStudent
-      */
-     private $group;
-     /**
-      * @return GroupStudent
-      */
-     public function getGroup(): ?GroupStudent
-     {
-         return $this->group;
-     }
-     /**
-      * @param GroupStudent $group
-      * @return AppelModel
-      */
-     public function setGroup(GroupStudent $group): AppelModel
-     {
-         $this->group = $group;
-         return $this;
-     }
-     /**
-      * @return Branche
-      */
-     public function getBranche(): ?Branche
-     {
-         return $this->branche;
-     }
-     /**
-      * @param Branche $branche
-      * @return AppelModel
-      */
-     public function setBranche(Branche $branche): AppelModel
-     {
-         $this->branche = $branche;
-         return $this;
-     }
-     /**
-      * @return Secteur
-      */
-     public function getSecteur(): ?Secteur
-     {
-         return $this->secteur;
-     }
-     /**
-      * @param Secteur $secteur
-      * @return AppelModel
-      */
-     public function setSecteur(Secteur $secteur): AppelModel
-     {
-         $this->secteur = $secteur;
-         return $this;
-     }
-     /**
-      * Specify data which should be serialized to JSON
-      * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
-      * @return mixed data which can be serialized by <b>json_encode</b>,
-      * which is a value of any type other than a resource.
-      * @since 5.4.0
-      */
-     public function jsonSerialize()
-     {
-         return [
-             'branche' => $this->branche->getId(),
-             'secteur' => (null !== $this->secteur) ? $this->secteur->getId() : null,
-             'group' => (null !== $this->group) ? $this->group->getId() : null
-         ];
-     }
- }