src/JuridicusBundle/Entity/Bundesland.php line 16

Open in your IDE?
  1. <?php
  2. namespace JF\JuridicusBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8.  * Bundesland
  9.  * 
  10.  * @ORM\Entity
  11.  * @UniqueEntity("name") 
  12.  */
  13. class Bundesland
  14. {
  15.     const CLASSNAME __CLASS__;
  16.     
  17.     /**
  18.      * @var integer
  19.      */
  20.     private $id;
  21.     /**
  22.      * @Assert\NotNull()
  23.      * 
  24.      * @var string
  25.      */
  26.     private $name;
  27.     /**
  28.      * @Assert\NotNull()
  29.      * 
  30.      * @var string
  31.      */
  32.     private $kuerzel;
  33.     /**
  34.      * @var string
  35.      */
  36.     private $slug;
  37.     /**
  38.      * @var \Doctrine\Common\Collections\Collection
  39.      */
  40.     private $kunden;
  41.     /**
  42.      * @var \Doctrine\Common\Collections\Collection
  43.      */
  44.     private $pruefungsaemter;
  45.     /**
  46.      * Constructor
  47.      */
  48.     public function __construct()
  49.     {
  50.         $this->kunden = new ArrayCollection();
  51.         $this->pruefungsaemter = new ArrayCollection();
  52.     }
  53.     /**
  54.      * Get id
  55.      *
  56.      * @return integer
  57.      */
  58.     public function getId()
  59.     {
  60.         return $this->id;
  61.     }
  62.     /**
  63.      * Set name
  64.      *
  65.      * @param string $name
  66.      * @return Bundesland
  67.      */
  68.     public function setName($name)
  69.     {
  70.         $this->name $name;
  71.         return $this;
  72.     }
  73.     /**
  74.      * Get name
  75.      *
  76.      * @return string
  77.      */
  78.     public function getName()
  79.     {
  80.         return $this->name;
  81.     }
  82.     /**
  83.      * Set kuerzel
  84.      *
  85.      * @param string $kuerzel
  86.      * @return Bundesland
  87.      */
  88.     public function setKuerzel($kuerzel)
  89.     {
  90.         $this->kuerzel $kuerzel;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get kuerzel
  95.      *
  96.      * @return string
  97.      */
  98.     public function getKuerzel()
  99.     {
  100.         return $this->kuerzel;
  101.     }
  102.     /**
  103.      * Set slug
  104.      *
  105.      * @param string $slug
  106.      * @return Bundesland
  107.      */
  108.     public function setSlug($slug)
  109.     {
  110.         $this->slug $slug;
  111.         return $this;
  112.     }
  113.     /**
  114.      * Get slug
  115.      *
  116.      * @return string
  117.      */
  118.     public function getSlug()
  119.     {
  120.         return $this->slug;
  121.     }
  122.     /**
  123.      * Add kunden [INVERSE SITE]
  124.      *
  125.      * @param \JF\JuridicusBundle\Entity\Kunde $kunden
  126.      * @return Bundesland
  127.      */
  128.     public function addKunden(Kunde $kunden)
  129.     {
  130.         $this->kunden[] = $kunden;
  131.         return $this;
  132.     }
  133.     /**
  134.      * Remove kunden [INVERSE SITE]
  135.      *
  136.      * @param \JF\JuridicusBundle\Entity\Kunde $kunden
  137.      */
  138.     public function removeKunden(Kunde $kunden)
  139.     {
  140.         $this->kunden->removeElement($kunden);
  141.     }
  142.     /**
  143.      * Get kunden
  144.      *
  145.      * @return \Doctrine\Common\Collections\Collection
  146.      */
  147.     public function getKunden()
  148.     {
  149.         return $this->kunden;
  150.     }
  151.     /**
  152.      * Add pruefungsaemter [INVERSE SITE]
  153.      *
  154.      * @param \JF\JuridicusBundle\Entity\Pruefungsamt $pruefungsaemter
  155.      * @return Bundesland
  156.      */
  157.     public function addPruefungsaemter(Pruefungsamt $pruefungsaemter)
  158.     {
  159.         $this->pruefungsaemter[] = $pruefungsaemter;
  160.         return $this;
  161.     }
  162.     /**
  163.      * Remove pruefungsaemter [INVERSE SITE]
  164.      *
  165.      * @param \JF\JuridicusBundle\Entity\Pruefungsamt $pruefungsaemter
  166.      */
  167.     public function removePruefungsaemter(Pruefungsamt $pruefungsaemter)
  168.     {
  169.         $this->pruefungsaemter->removeElement($pruefungsaemter);
  170.     }
  171.     /**
  172.      * Get pruefungsaemter
  173.      *
  174.      * @return \Doctrine\Common\Collections\Collection
  175.      */
  176.     public function getPruefungsaemter()
  177.     {
  178.         return $this->pruefungsaemter;
  179.     }
  180.     /**
  181.      * String Representation
  182.      *
  183.      * @return string
  184.      */
  185.     public function __toString()
  186.     {
  187.         return $this->getName();
  188.     }
  189. }