src/JuridicusBundle/Entity/ProtokollInfothekPruefung.php line 14

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. use JF\JuridicusBundle\Entity\Pruefung;
  8. /**
  9.  * ProtokollInfothekPruefung
  10.  */
  11. class ProtokollInfothekPruefung extends InitModeEntity
  12. {
  13.     const CLASSNAME __CLASS__;
  14.     /**
  15.      * @var integer
  16.      */
  17.     private $id;
  18.     /**
  19.      * @var integer
  20.      */
  21.     private $mask;
  22.     /**
  23.      * @var \DateTime
  24.      * @Assert\Type(\DateTimeInterface::class)
  25.      */
  26.     private $datum;
  27.     /**
  28.      * @var string
  29.      * @Assert\NotBlank(groups={"finish"})
  30.      * @Assert\Length(max="64")
  31.      */
  32.     private $ort;
  33.     /**
  34.      * @var string
  35.      * @Assert\Length(max="48")
  36.      */
  37.     private $wahlfach;
  38.     /**
  39.      * @var string
  40.      * @Assert\Length(max="48")
  41.      */
  42.     private $aktenvortrag;
  43.     /**
  44.      * @var integer
  45.      * @Assert\Type(type="integer")
  46.      * @Assert\Range(min="1",max="2")
  47.      * @Assert\NotNull(message="Bitte Examen angeben")
  48.      */
  49.     private $examen;
  50.     /**
  51.      * @var boolean
  52.      * @Assert\NotNull()
  53.      */
  54.     private $wahlfachpruefung false;
  55.     /**
  56.      * @var boolean
  57.      * @Assert\NotNull(message="Bitte Aktiv-Status angeben")
  58.      */
  59.     private $aktiv false;
  60.     /**
  61.      * @var boolean
  62.      * @Assert\NotNull(message="Bitte Fertig-Status angeben")
  63.      */
  64.     private $fertig false;
  65.     /**
  66.      * @var \DateTime
  67.      */
  68.     private $fertig_at null;
  69.     /**
  70.      * @var boolean
  71.      */
  72.     private $pdf_need_update true;
  73.     /**
  74.      * @var boolean
  75.      */
  76.     private $send_last_minute;
  77.     /**
  78.      * @var \DateTime
  79.      * @Assert\Type(\DateTimeInterface::class)
  80.      */
  81.     private $created_at;
  82.     /**
  83.      * @var \DateTime
  84.      * @Assert\Type(\DateTimeInterface::class)
  85.      */
  86.     private $updated_at;
  87.     /**
  88.      * @var \JF\JuridicusBundle\Entity\Pruefung
  89.      */
  90.     private $pruefung;
  91.     /**
  92.      * @var \JF\JuridicusBundle\Entity\KundePruefung
  93.      */
  94.     private $kunde_pruefung;
  95.     /**
  96.      * @var \JF\JuridicusBundle\Entity\PdfProtokollInfothekPruefung
  97.      */
  98.     private $pdf_protokoll_infothek_pruefung;
  99.     /**
  100.      * @var \Doctrine\Common\Collections\Collection
  101.      * @Assert\Valid(traverse=true)
  102.      */
  103.     private $protokoll_infothek_pruefer;
  104.     /**
  105.      * @var \Doctrine\Common\Collections\Collection
  106.      * @Assert\Valid(traverse=true)
  107.      */
  108.     private $protokoll_infothek_noten;
  109.     /**
  110.      *
  111.      * @var \JF\JuridicusBundle\Entity\ProtokollKlausur
  112.      * @Assert\Valid()
  113.      */
  114.     private $protokoll_klausur;
  115.     /**
  116.      *
  117.      * @var \JF\JuridicusBundle\Entity\ProtokollAktenvortrag
  118.      * @Assert\Valid()
  119.      */
  120.     private $protokoll_aktenvortrag;
  121.     /**
  122.      * @var \Doctrine\Common\Collections\Collection
  123.      */
  124.     private $similarities;
  125.     /**
  126.      * Constructor
  127.      */
  128.     public function __construct()
  129.     {
  130.         $this->protokoll_infothek_pruefer = new ArrayCollection();
  131.         $this->protokoll_infothek_noten = new ArrayCollection();
  132.         $this->similarities = new ArrayCollection();
  133.     }
  134.     
  135.     /**
  136.      * Get id
  137.      *
  138.      * @return integer
  139.      */
  140.     public function getId()
  141.     {
  142.         return $this->id;
  143.     }
  144.     /**
  145.      * Set datum
  146.      *
  147.      * @param \DateTime $datum
  148.      * @return ProtokollInfothekPruefung
  149.      */
  150.     public function setDatum(\DateTime $datum null)
  151.     {
  152.         $this->datum $datum;
  153.         return $this;
  154.     }
  155.     /**
  156.      * Get datum
  157.      *
  158.      * @return \DateTime
  159.      */
  160.     public function getDatum()
  161.     {
  162.         return $this->datum;
  163.     }
  164.     /**
  165.      * Set ort
  166.      *
  167.      * @param string $ort
  168.      * @return ProtokollInfothekPruefung
  169.      */
  170.     public function setOrt($ort)
  171.     {
  172.         $this->ort $ort;
  173.         return $this;
  174.     }
  175.     /**
  176.      * Get ort
  177.      *
  178.      * @return string
  179.      */
  180.     public function getOrt()
  181.     {
  182.         return $this->ort;
  183.     }
  184.     /**
  185.      * Set wahlfach
  186.      *
  187.      * @param string $wahlfach
  188.      * @return ProtokollInfothekPruefung
  189.      */
  190.     public function setWahlfach($wahlfach)
  191.     {
  192.         $this->wahlfach $wahlfach;
  193.         return $this;
  194.     }
  195.     /**
  196.      * Get wahlfach
  197.      *
  198.      * @return string
  199.      */
  200.     public function getWahlfach()
  201.     {
  202.         return $this->wahlfach;
  203.     }
  204.     /**
  205.      * Set aktenvortrag
  206.      *
  207.      * @param string $aktenvortrag
  208.      * @return ProtokollInfothekPruefung
  209.      */
  210.     public function setAktenvortrag($aktenvortrag)
  211.     {
  212.         $this->aktenvortrag $aktenvortrag;
  213.         if ($this->getProtokollAktenvortrag()) {
  214.             $this->getProtokollAktenvortrag()->setFach($aktenvortrag);
  215.         }
  216.         return $this;
  217.     }
  218.     /**
  219.      * Get aktenvortrag
  220.      *
  221.      * @return string
  222.      */
  223.     public function getAktenvortrag()
  224.     {
  225.         return $this->aktenvortrag;
  226.     }
  227.     /**
  228.      * Set aktiv
  229.      *
  230.      * @param boolean $aktiv
  231.      * @return ProtokollInfothekPruefung
  232.      */
  233.     public function setAktiv($aktiv true)
  234.     {
  235.         $this->aktiv = (bool) $aktiv;
  236.         return $this;
  237.     }
  238.     /**
  239.      * Get aktiv
  240.      *
  241.      * @return boolean
  242.      */
  243.     public function getAktiv()
  244.     {
  245.         return $this->aktiv;
  246.     }
  247.     /**
  248.      * Set fertig
  249.      *
  250.      * @param boolean $fertig
  251.      * @return ProtokollInfothekPruefung
  252.      */
  253.     public function setFertig($fertig true)
  254.     {
  255.         $this->fertig = (bool) $fertig;
  256.         if ($this->getProtokollAktenvortrag()) {
  257.             $this->getProtokollAktenvortrag()->setFertig($fertig);
  258.         }
  259.         if ($this->getProtokollKlausur()) {
  260.             $this->getProtokollKlausur()->setFertig($fertig);
  261.         }
  262.         return $this;
  263.     }
  264.     /**
  265.      * Get fertig
  266.      *
  267.      * @return boolean
  268.      */
  269.     public function getFertig()
  270.     {
  271.         return $this->fertig;
  272.     }
  273.     /**
  274.      * Set created_at
  275.      *
  276.      * @param \DateTime $createdAt
  277.      * @return ProtokollInfothekPruefung
  278.      */
  279.     public function setCreatedAt(\DateTime $createdAt null)
  280.     {
  281.         $this->created_at $createdAt;
  282.         return $this;
  283.     }
  284.     /**
  285.      * Get created_at
  286.      *
  287.      * @return \DateTime
  288.      */
  289.     public function getCreatedAt()
  290.     {
  291.         return $this->created_at;
  292.     }
  293.     /**
  294.      * Set updated_at
  295.      *
  296.      * @param \DateTime $updatedAt
  297.      * @return ProtokollInfothekPruefung
  298.      */
  299.     public function setUpdatedAt(\DateTime $updatedAt null)
  300.     {
  301.         $this->updated_at $updatedAt;
  302.         return $this;
  303.     }
  304.     /**
  305.      * Get updated_at
  306.      *
  307.      * @return \DateTime
  308.      */
  309.     public function getUpdatedAt()
  310.     {
  311.         return $this->updated_at;
  312.     }
  313.     /**
  314.      * Set kunde_pruefung [INVERSE SIDE]
  315.      *
  316.      * @param \JF\JuridicusBundle\Entity\KundePruefung $kundePruefung
  317.      * @return ProtokollInfothekPruefung
  318.      */
  319.     public function setKundePruefung(KundePruefung $kundePruefung null)
  320.     {
  321.         $this->kunde_pruefung $kundePruefung;
  322.         if ($this->getProtokollAktenvortrag()) {
  323.             $this->getProtokollAktenvortrag()->setKundePruefung($kundePruefung);
  324.             if ($kundePruefung) {
  325.                 $this->getProtokollAktenvortrag()->setPruefungsamt($kundePruefung->getPruefungsamt());
  326.             }
  327.         }
  328.         if ($this->getProtokollKlausur()) {
  329.             $this->getProtokollKlausur()->setKundePruefung($kundePruefung);
  330.         }
  331.         return $this;
  332.     }
  333.     /**
  334.      * Get kunde_pruefung
  335.      *
  336.      * @return \JF\JuridicusBundle\Entity\KundePruefung
  337.      */
  338.     public function getKundePruefung()
  339.     {
  340.         return $this->kunde_pruefung;
  341.     }
  342.     /**
  343.      * Add protokoll_infothek_pruefer [INVERSE SIDE]
  344.      *
  345.      * @param \JF\JuridicusBundle\Entity\ProtokollInfothekPruefer $protokollInfothekPruefer
  346.      * @return ProtokollInfothekPruefung
  347.      */
  348.     public function addProtokollInfothekPruefer(ProtokollInfothekPruefer $protokollInfothekPruefer)
  349.     {
  350.         $this->protokoll_infothek_pruefer[] = $protokollInfothekPruefer;
  351.         $protokollInfothekPruefer->setProtokollInfothekPruefung($this);
  352.         return $this;
  353.     }
  354.     /**
  355.      * Remove protokoll_infothek_pruefer [INVERSE SIDE]
  356.      *
  357.      * @param \JF\JuridicusBundle\Entity\ProtokollInfothekPruefer $protokollInfothekPruefer
  358.      */
  359.     public function removeProtokollInfothekPruefer(ProtokollInfothekPruefer $protokollInfothekPruefer)
  360.     {
  361.         $this->protokoll_infothek_pruefer->removeElement($protokollInfothekPruefer);
  362.         $protokollInfothekPruefer->setProtokollInfothekPruefung(null);
  363.     }
  364.     /**
  365.      * Get protokoll_infothek_pruefer
  366.      *
  367.      * @return \Doctrine\Common\Collections\Collection
  368.      */
  369.     public function getProtokollInfothekPruefer()
  370.     {
  371.         return $this->protokoll_infothek_pruefer;
  372.     }
  373.     /**
  374.      * Set pdf_protokoll_infothek_pruefung [INVERSE SIDE]
  375.      *
  376.      * @param \JF\JuridicusBundle\Entity\PdfProtokollInfothekPruefung $pdfProtokollInfothekPruefung
  377.      * @return ProtokollInfothekPruefung
  378.      */
  379.     public function setPdfProtokollInfothekPruefung(PdfProtokollInfothekPruefung $pdfProtokollInfothekPruefung null)
  380.     {
  381.         $this->pdf_protokoll_infothek_pruefung $pdfProtokollInfothekPruefung;
  382.         return $this;
  383.     }
  384.     /**
  385.      * Get pdf_protokoll_infothek_pruefung
  386.      *
  387.      * @return \JF\JuridicusBundle\Entity\PdfProtokollInfothekPruefung
  388.      */
  389.     public function getPdfProtokollInfothekPruefung()
  390.     {
  391.         return $this->pdf_protokoll_infothek_pruefung;
  392.     }
  393.     /**
  394.      * Add protokoll_infothek_noten [INVERSE SIDE]
  395.      *
  396.      * @param \JF\JuridicusBundle\Entity\ProtokollInfothekNoten $protokollInfothekNoten
  397.      * @return ProtokollInfothekPruefung
  398.      */
  399.     public function addProtokollInfothekNoten(ProtokollInfothekNoten $protokollInfothekNoten)
  400.     {
  401.         $this->protokoll_infothek_noten[] = $protokollInfothekNoten;
  402.         $protokollInfothekNoten->setProtokollInfothekPruefung($this);
  403.         return $this;
  404.     }
  405.     /**
  406.      * Remove protokoll_infothek_noten [INVERSE SIDE]
  407.      *
  408.      * @param \JF\JuridicusBundle\Entity\ProtokollInfothekNoten $protokollInfothekNoten
  409.      */
  410.     public function removeProtokollInfothekNoten(ProtokollInfothekNoten $protokollInfothekNoten)
  411.     {
  412.         $this->protokoll_infothek_noten->removeElement($protokollInfothekNoten);
  413.         $protokollInfothekNoten->setProtokollInfothekPruefung(null);
  414.     }
  415.     /**
  416.      * Get protokoll_infothek_noten
  417.      *
  418.      * @return \Doctrine\Common\Collections\Collection
  419.      */
  420.     public function getProtokollInfothekNoten()
  421.     {
  422.         return $this->protokoll_infothek_noten;
  423.     }
  424.     /**
  425.      * Set pruefung [OWNING SIDE]
  426.      *
  427.      * @param \JF\JuridicusBundle\Entity\Pruefung $pruefung
  428.      * @return ProtokollInfothekPruefung
  429.      */
  430.     public function setPruefung(Pruefung $pruefung null)
  431.     {
  432.         $this->pruefung $pruefung;
  433.         return $this;
  434.     }
  435.     /**
  436.      * Get pruefung
  437.      *
  438.      * @return \JF\JuridicusBundle\Entity\Pruefung
  439.      */
  440.     public function getPruefung()
  441.     {
  442.         return $this->pruefung;
  443.     }
  444.     /**
  445.      * String Representation
  446.      *
  447.      * @return string
  448.      */
  449.     public function __toString()
  450.     {
  451.         if (isset($this->id)) {
  452.             return sprintf('Kundenprotokoll #%s'$this->id);
  453.         }
  454.         return 'Neues Kundenprotokoll';
  455.     }
  456.     /**
  457.      * get Kommission
  458.      *
  459.      * @param int $sortierung gibt an welches Kommissionsmitglied als Prüfer gekennzeichnet wird
  460.      * @return string[]
  461.      */
  462.     private function getKommission($sortierung)
  463.     {
  464.         $kommission = array();
  465.        
  466.         foreach ($this->getProtokollInfothekPruefer() as $protokoll_infothek_pruefer) {
  467.             $pruefer $protokoll_infothek_pruefer->getPruefer();
  468.             if ($protokoll_infothek_pruefer->getSortierung() == 1) {
  469.                 if ($protokoll_infothek_pruefer->getSortierung() == $sortierung) {
  470.                     $kommission[] = sprintf('%s (Vorsitzender + Prüfer)',
  471.                         $pruefer->getFullTextWithOrt());
  472.                 } else {
  473.                     $kommission[] = sprintf('%s (Vorsitzender)',
  474.                         $pruefer->getFullTextWithOrt());
  475.                 }
  476.             } else if ($protokoll_infothek_pruefer->getSortierung() == $sortierung) {
  477.                 $kommission[] = sprintf('%s (Prüfer)',
  478.                     $pruefer->getFullTextWithOrt());
  479.             } else {
  480.                 $kommission[] = $pruefer->getFullTextWithOrt();
  481.             }
  482.         }
  483.         return $kommission;
  484.     }
  485.     /**
  486.      * addBaseToPdf - fügt Basisdaten in die Pdf-Datei ein
  487.      *
  488.      * @param \TCPDF $pdf
  489.      * @param $sortierung gibt an welches Kommissionsmitglied als Prüfer markiert werden soll
  490.      */
  491.     public function addBaseToPdf(\TCPDF $pdf$sortierung)
  492.     {
  493.         $width 50;
  494.         $nwidth 10;
  495.         if ($this->examen == && ! $this->wahlfachpruefung) {
  496.             $pdf->writeHTML('<h3>Protokoll der mündlichen Prüfung zum 1. Staatsexamen</h3>');
  497.         } elseif ($this->examen == && $this->wahlfachpruefung) {
  498.             $pdf->writeHTML('<h3>Protokoll der mündlichen Wahlfachprüfung zum 1. Staatsexamen</h3>');
  499.         } elseif ($this->examen == && ! $this->wahlfachpruefung) {
  500.             $pdf->writeHTML('<h3>Protokoll der mündlichen Prüfung zum 2. Staatsexamen</h3>');
  501.         } elseif ($this->examen == && $this->wahlfachpruefung) {
  502.             $pdf->writeHTML('<h3>Protokoll der mündlichen Wahlfachprüfung zum 2. Staatsexamen</h3>');
  503.         }
  504.         $pdf->Ln(5);
  505.         $pdf->Cell($width0"vom");
  506.         $pdf->Cell(00$this->datum->format('d.m.Y'));
  507.         $pdf->Ln();
  508.         $pdf->Cell($width0"in");
  509.         $pdf->Cell(00$this->ort);
  510.         $pdf->Ln();
  511.         if ($this->mask ProtokollInfothekNoten::OPTION_WAHLFACH && $this->wahlfach) {
  512.             $pdf->Cell($width0"Wahlfach");
  513.             $pdf->Cell(00$this->wahlfach01);
  514.         } else if ($this->mask ProtokollInfothekNoten::OPTION_VORTRAG && $this->aktenvortrag) {
  515.             $pdf->Cell($width0"Rechtsgebiet Aktenvortrag");
  516.             $pdf->Cell(00$this->aktenvortrag01);
  517.         }
  518.         $pdf->Cell($width0'Kommissionsmitglieder');
  519.         foreach ($this->getKommission($sortierung) as $kommission) {
  520.             $pdf->Cell(00$kommission02);
  521.         }
  522.         $pdf->Ln(0);
  523.     }
  524.     /**
  525.      * addNotenToPdf - fügt Notentabelle in Pdf-Datei ein
  526.      *
  527.      * @param \TCPDF $pdf
  528.      */
  529.     public function addNotenToPdf(\TCPDF $pdf)
  530.     {
  531.         $noten $this->getProtokollInfothekNoten();
  532.         if (!$noten) {
  533.             return;
  534.         }
  535.         // Notentabelle einfügen
  536.         $fill 0;
  537.         $pdf->SetFillColor(196);
  538.         // Header
  539.         $pdf->Cell(506"Kandidat"10'C'1);
  540.         foreach ($noten as $note) {
  541.             $note->createHeaderCell($pdf);
  542.         }
  543.         $pdf->Ln();
  544.         // Body
  545.         foreach (ProtokollInfothekNoten::getOptionKeys() as $key) {
  546.             if ($this->mask $key) {
  547.                 $this->createTableRow($pdf$key$fill);
  548.                 $fill = !$fill;
  549.             }
  550.         }
  551.     }
  552.     /**
  553.      * createTableRow
  554.      *
  555.      * Fügt eine Zeile zu einer Notentabelle hinzu
  556.      *
  557.      * @param \TCPDF $pdf
  558.      * @param integer $key Auswahl der Note
  559.      * @param boolean $fill
  560.      */
  561.     private function createTableRow(\TCPDF $pdf$key$fill)
  562.     {
  563.         // Zeilen-Bezeichnung eintragen
  564.         $pdf->SetFillColor(196);
  565.         $pdf->Cell(506ProtokollInfothekNoten::getOptionString($key), 10,
  566.             ProtokollInfothekNoten::getAlignment($key), 1);
  567.         // Noten eintragen
  568.         $pdf->SetFillColor(224235255);
  569.         foreach ($this->getProtokollInfothekNoten() as $note) {
  570.             $note->createBodyCell($pdf$key$fill);
  571.         }
  572.         $pdf->Ln();
  573.     }
  574.     /**
  575.      * Set mask
  576.      *
  577.      * @param integer $mask
  578.      * @return ProtokollInfothekPruefung
  579.      */
  580.     public function setMask($mask)
  581.     {
  582.         $this->mask $mask;
  583.         return $this;
  584.     }
  585.     /**
  586.      * Get mask
  587.      *
  588.      * @return integer
  589.      */
  590.     public function getMask()
  591.     {
  592.         return $this->mask;
  593.     }
  594.     /**
  595.      *
  596.      * @param integer $option
  597.      * @return boolean
  598.      */
  599.     public function hasNotenOption($option)
  600.     {
  601.         return (bool) ($this->mask $option);
  602.     }
  603.     /**
  604.      * Set examen
  605.      *
  606.      * @param integer $examen
  607.      * @return ProtokollInfothekPruefung
  608.      */
  609.     public function setExamen($examen)
  610.     {
  611.         $this->examen $examen;
  612.         return $this;
  613.     }
  614.     /**
  615.      * Get examen
  616.      *
  617.      * @return integer
  618.      */
  619.     public function getExamen()
  620.     {
  621.         return $this->examen;
  622.     }
  623.     /**
  624.      * Set wahlfachpruefung
  625.      *
  626.      * @param boolean $wahlfachpruefung
  627.      * @return ProtokollInfothekPruefung
  628.      */
  629.     public function setWahlfachpruefung($wahlfachpruefung)
  630.     {
  631.         $this->wahlfachpruefung $wahlfachpruefung;
  632.         return $this;
  633.     }
  634.     /**
  635.      * Get wahlfachpruefung
  636.      *
  637.      * @return boolean
  638.      */
  639.     public function getWahlfachpruefung()
  640.     {
  641.         return $this->wahlfachpruefung;
  642.     }
  643.     /**
  644.      * Add similarities
  645.      *
  646.      * @param \JF\JuridicusBundle\Entity\Similarity $similarities
  647.      * @return ProtokollInfothekPruefung
  648.      */
  649.     public function addSimilaritie(Similarity $similarities)
  650.     {
  651.         $this->similarities[] = $similarities;
  652.         return $this;
  653.     }
  654.     /**
  655.      * Remove similarities
  656.      *
  657.      * @param \JF\JuridicusBundle\Entity\Similarity $similarities
  658.      */
  659.     public function removeSimilaritie(Similarity $similarities)
  660.     {
  661.         $this->similarities->removeElement($similarities);
  662.     }
  663.     /**
  664.      * Get similarities
  665.      *
  666.      * @return \Doctrine\Common\Collections\Collection
  667.      */
  668.     public function getSimilarities()
  669.     {
  670.         return $this->similarities;
  671.     }
  672.     /**
  673.      * Set pdf_need_update
  674.      *
  675.      * @param boolean $pdfNeedUpdate
  676.      * @return ProtokollInfothekPruefung
  677.      */
  678.     public function setPdfNeedUpdate($pdfNeedUpdate)
  679.     {
  680.         $this->pdf_need_update = (bool) $pdfNeedUpdate;
  681.         return $this;
  682.     }
  683.     /**
  684.      * Get pdf_need_update
  685.      *
  686.      * @return boolean
  687.      */
  688.     public function getPdfNeedUpdate()
  689.     {
  690.         return $this->pdf_need_update;
  691.     }
  692.     /**
  693.      * Set send_last_minute
  694.      *
  695.      * @param boolean $sendLastMinute
  696.      * @return ProtokollInfothekPruefung
  697.      */
  698.     public function setSendLastMinute($sendLastMinute)
  699.     {
  700.         $this->send_last_minute = (bool) $sendLastMinute;
  701.         return $this;
  702.     }
  703.     /**
  704.      * Get send_last_minute
  705.      *
  706.      * @return boolean
  707.      */
  708.     public function getSendLastMinute()
  709.     {
  710.         return $this->send_last_minute;
  711.     }
  712.     /**
  713.      * Set fertig_at
  714.      *
  715.      * @param \DateTime $fertigAt
  716.      * @return ProtokollInfothekPruefung
  717.      */
  718.     public function setFertigAt(\DateTime $fertigAt null)
  719.     {
  720.         $this->fertig_at $fertigAt;
  721.         return $this;
  722.     }
  723.     /**
  724.      * Get fertig_at
  725.      *
  726.      * @return \DateTime
  727.      */
  728.     public function getFertigAt()
  729.     {
  730.         return $this->fertig_at;
  731.     }
  732.     /**
  733.      *
  734.      * @param integer $limit
  735.      */
  736.     public function expandNoten($limit)
  737.     {
  738.         $count $this->getProtokollInfothekNoten()->count();
  739.         for ($i $count 1$i <= $limit$i++) {
  740.             $protokoll_infothek_noten = new ProtokollInfothekNoten();
  741.             $protokoll_infothek_noten->setKandidatNummer($i);
  742.             $this->addProtokollInfothekNoten($protokoll_infothek_noten);
  743.         }
  744.     }
  745.     /**
  746.      *
  747.      * @param integer $limit
  748.      */
  749.     public function expandPruefer($limit)
  750.     {
  751.         $count $this->getProtokollInfothekPruefer()->count();
  752.         for ($i $count 1$i <= $limit$i++) {
  753.             $protokoll_infothek_pruefer = new ProtokollInfothekPruefer();
  754.             $protokoll_infothek_pruefer->setSortierung($i);
  755.             $this->addProtokollInfothekPruefer($protokoll_infothek_pruefer);
  756.         }
  757.     }
  758.     /**
  759.      *
  760.      * @param \JF\JuridicusBundle\Entity\PrueferPruefung $prueferPruefung
  761.      */
  762.     public function addPrueferFromPrueferPruefung(PrueferPruefung $prueferPruefung)
  763.     {
  764.         $protokoll_infothek_pruefer = new ProtokollInfothekPruefer();
  765.         $protokoll_infothek_pruefer->setPruefer($prueferPruefung->getPruefer());
  766.         $protokoll_infothek_pruefer->setSortierung($prueferPruefung->getSortierung());
  767.         $protokoll_infothek_pruefer->setFach($prueferPruefung->getFach());
  768.         $this->addProtokollInfothekPruefer($protokoll_infothek_pruefer);
  769.     }
  770.     /**
  771.      *
  772.      * @param \JF\JuridicusBundle\Entity\Pruefung $pruefung
  773.      */
  774.     public function addPrueferFromPruefung(Pruefung $pruefung)
  775.     {
  776.         foreach ($pruefung->getPrueferPruefungen() as $prueferPruefung) {
  777.             $this->addPrueferFromPrueferPruefung($prueferPruefung);
  778.         }
  779.     }
  780.     /**
  781.      * removes empty ProtokollGesetz entities from each item of the protokoll_infothek_pruefer collection.
  782.      */
  783.     public function removeEmptyProtokollGesetze()
  784.     {
  785.         foreach ($this->getProtokollInfothekPruefer() as $p) {
  786.             $p->removeEmptyProtokollGesetze();
  787.         }
  788.     }
  789.     /**
  790.      * Set protokoll_klausur
  791.      *
  792.      * @param \JF\JuridicusBundle\Entity\ProtokollKlausur $protokollKlausur
  793.      * @return ProtokollInfothekPruefung
  794.      */
  795.     public function setProtokollKlausur(ProtokollKlausur $protokollKlausur null)
  796.     {
  797.         $this->protokoll_klausur $protokollKlausur;
  798.         if ($protokollKlausur) {
  799.             $protokollKlausur->setProtokollInfothekPruefung($this);
  800.         }
  801.         return $this;
  802.     }
  803.     /**
  804.      * Get protokoll_klausur
  805.      *
  806.      * @return \JF\JuridicusBundle\Entity\ProtokollKlausur
  807.      */
  808.     public function getProtokollKlausur()
  809.     {
  810.         return $this->protokoll_klausur;
  811.     }
  812.     /**
  813.      * Set protokoll_aktenvortrag
  814.      *
  815.      * @param \JF\JuridicusBundle\Entity\ProtokollAktenvortrag $protokollAktenvortrag
  816.      * @return ProtokollInfothekPruefung
  817.      */
  818.     public function setProtokollAktenvortrag(ProtokollAktenvortrag $protokollAktenvortrag null)
  819.     {
  820.         $this->protokoll_aktenvortrag $protokollAktenvortrag;
  821.         if ($protokollAktenvortrag) {
  822.             $protokollAktenvortrag->setProtokollInfothekPruefung($this);
  823.         }
  824.         return $this;
  825.     }
  826.     /**
  827.      * Get protokoll_aktenvortrag
  828.      *
  829.      * @return \JF\JuridicusBundle\Entity\ProtokollAktenvortrag
  830.      */
  831.     public function getProtokollAktenvortrag()
  832.     {
  833.         return $this->protokoll_aktenvortrag;
  834.     }
  835.     /**
  836.      *
  837.      */
  838.     public function updateChildData()
  839.     {
  840.         $buchung $this->getKundePruefung();
  841.         $protokoll_klausur $this->getProtokollKlausur();
  842.         if ($protokoll_klausur) {
  843.             $protokoll_klausur->setKundePruefung($buchung);
  844.             if ($buchung) {
  845.                 $protokoll_klausur->setPruefungsamt($buchung->getPruefungsamt());
  846.             }
  847.             $protokoll_klausur->setFertig($this->getFertig());
  848.         }
  849.         $protokoll_aktenvortrag $this->getProtokollAktenvortrag();
  850.         if ($protokoll_aktenvortrag) {
  851.             $protokoll_aktenvortrag->setKundePruefung($buchung);
  852.             if ($buchung) {
  853.                 $protokoll_aktenvortrag->setPruefungsamt($buchung->getPruefungsamt());
  854.             }
  855.             $protokoll_aktenvortrag->setFach($this->getAktenvortrag());
  856.             $protokoll_aktenvortrag->setFertig($this->getFertig());
  857.         }
  858.     }
  859. }