src/JuridicusBundle/Entity/ProtokollInfothekPruefer.php line 20

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 JF\JuridicusBundle\Validator\Constraints as JfAssert;
  7. use JF\JuridicusBundle\Utils\Juridicus;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use JF\JuridicusBundle\Repository\ProtokollInfothekPrueferRepository;
  10. /**
  11. * ProtokollInfothekPruefer
  12. *
  13. * @UniqueEntity(fields={"protokoll_infothek_pruefung","pruefer"}, message="Ein Prüfer kann nur einmal an der Prüfung teilnehmen.")
  14. */
  15. #[ORM\Entity(repositoryClass: ProtokollInfothekPrueferRepository::class)]
  16. class ProtokollInfothekPruefer extends InitModeEntity
  17. {
  18. const CLASSNAME = __CLASS__;
  19. /**
  20. * @var integer
  21. */
  22. private $id;
  23. /**
  24. * @var integer
  25. */
  26. private $sortierung = 0;
  27. /**
  28. * @var string
  29. * @Assert\Length(max="18")
  30. */
  31. private $fach;
  32. /**
  33. * @var integer
  34. * @Assert\Type(type="integer")
  35. * @Assert\Range(min="1", max="2047", minMessage="Es muss mindestens ein Wert ausgewählt werden.",groups={"finish"})
  36. */
  37. private $person_verhalten;
  38. /**
  39. * @var array
  40. */
  41. private static $person_verhalten_options = array(
  42. 1 => 'freundlich',
  43. 2 => 'humorvoll',
  44. 4 => 'neutral',
  45. 8 => 'distanziert',
  46. 16 => 'wohlwollend',
  47. 32 => 'beruhigend',
  48. 64 => 'nervös',
  49. 128 => 'unsicher',
  50. 256 => 'ungeduldig',
  51. 512 => 'ernst',
  52. 1024 => 'sachlich'
  53. );
  54. /**
  55. * @return array
  56. */
  57. public static function getPersonVerhaltenOptions()
  58. {
  59. return self::$person_verhalten_options;
  60. }
  61. /**
  62. * @var integer
  63. * @Assert\NotNull(groups={"finish"}, message="Es muss ein Wert ausgewählt werden.")
  64. * @Assert\Choice(callback = "getPersonFuehrtKeys", groups={"finish"})
  65. */
  66. private $person_fuehrt;
  67. /**
  68. * @var array
  69. */
  70. private static $person_fuehrt_options = array(
  71. 0 => 'gut',
  72. 1 => 'schlecht'
  73. );
  74. /**
  75. * @return string
  76. * @throws \OutOfBoundsException
  77. */
  78. public function getPersonFuehrtString()
  79. {
  80. if (!isset($this->person_fuehrt)) {
  81. return '';
  82. } else if (isset(self::$person_fuehrt_options[$this->person_fuehrt])) {
  83. return self::$person_fuehrt_options[$this->person_fuehrt];
  84. } else {
  85. throw new \OutOfBoundsException(sprintf('%s, Ungültiger Index %d', __METHOD__, $this->person_fuehrt));
  86. }
  87. }
  88. /**
  89. * @return array
  90. */
  91. public static function getPersonFuehrtKeys()
  92. {
  93. return array_keys(self::$person_fuehrt_options);
  94. }
  95. /**
  96. * @return array
  97. */
  98. public static function getPersonFuehrtOptions()
  99. {
  100. return self::$person_fuehrt_options;
  101. }
  102. /**
  103. * @var integer
  104. * @Assert\NotNull(groups={"finish"}, message="Es muss ein Wert ausgewählt werden.")
  105. * @Assert\Choice(callback="getPersonNotengebungKeys",groups={"finish"})
  106. */
  107. private $person_notengebung;
  108. /**
  109. * @return string
  110. * @throws \OutOfBoundsException
  111. */
  112. public function getPersonNotengebungString()
  113. {
  114. if (!isset($this->person_notengebung)) {
  115. return '';
  116. } else if (isset(self::$person_notengebung_options[$this->person_notengebung])) {
  117. return self::$person_notengebung_options[$this->person_notengebung];
  118. } else {
  119. throw new \OutOfBoundsException(sprintf('%s, Ungültiger Index %d', __METHOD__, $this->person_notengebung));
  120. }
  121. }
  122. /**
  123. * @var array
  124. */
  125. private static $person_notengebung_options = array(
  126. 1 => 'wohlwollend',
  127. 2 => 'korrekt',
  128. 3 => 'streng'
  129. );
  130. /**
  131. * @return array
  132. */
  133. public static function getPersonNotengebungKeys()
  134. {
  135. return array_keys(self::$person_notengebung_options);
  136. }
  137. /**
  138. * @return array
  139. */
  140. public static function getPersonNotengebungOptions()
  141. {
  142. return self::$person_notengebung_options;
  143. }
  144. /**
  145. * @var integer
  146. * @Assert\NotNull(groups={"finish"}, message="Es muss ein Wert ausgewählt werden.")
  147. * @Assert\Range(min="1", max="5", groups={"finish"})
  148. */
  149. private $person_eindruck;
  150. /**
  151. * @var string
  152. * @Assert\NotBlank(groups={"finish"})
  153. * @JfAssert\StripMinLength(min="500", groups={"finish"})
  154. */
  155. private $person_lang;
  156. /**
  157. * @var integer
  158. * @Assert\Range(min="0", max="3", groups={"finish"})
  159. */
  160. private $sache_stoff;
  161. /**
  162. * @var array
  163. */
  164. private static $sache_stoff_options = array(
  165. 1 => "protokollfest",
  166. 2 => "aktuelle Fälle"
  167. );
  168. /**
  169. * @return array
  170. */
  171. public static function getSacheStoffOptions()
  172. {
  173. return self::$sache_stoff_options;
  174. }
  175. /**
  176. * @var string
  177. * @Assert\NotBlank(groups={"finish"})
  178. */
  179. private $sache_themen;
  180. /**
  181. * @var integer
  182. * @Assert\NotNull(groups={"finish"})
  183. * @Assert\Range(min="1", minMessage="Es muss mindestens ein Wert ausgewählt werden.", groups={"finish"})
  184. */
  185. private $sache_gespraech;
  186. /**
  187. * @var array
  188. */
  189. private static $sache_gespraech_options = array(
  190. 1 => 'Frage-Antwort',
  191. 2 => 'Diskussion',
  192. 4 => 'hält Reihenfolge ein',
  193. 8 => 'lässt Meldungen zu',
  194. 16 => 'Intensivbefragung Einzelner',
  195. 32 => 'verfolgt Zwischenthemen',
  196. 64 => 'hart am Fall',
  197. 128 => 'lässt sich ablenken',
  198. 256 => 'Fragestellung klar'
  199. );
  200. /**
  201. * @return array
  202. */
  203. public static function getSacheGespraechOptions()
  204. {
  205. return self::$sache_gespraech_options;
  206. }
  207. /**
  208. * @var string
  209. * @Assert\NotBlank(groups={"finish"})
  210. * @JfAssert\StripMinLength(min="1500", groups={"finish"})
  211. */
  212. private $sache_lang;
  213. /**
  214. * @var \JF\JuridicusBundle\Entity\Pruefer
  215. * @Assert\NotNull(message="Bitte Prüfer angeben",groups={"finish"})
  216. */
  217. private $pruefer;
  218. /**
  219. * @var \JF\JuridicusBundle\Entity\PdfProtokollInfothekPruefer
  220. */
  221. private $pdf_protokoll_infothek_pruefer;
  222. /**
  223. * @var \JF\JuridicusBundle\Entity\ProtokollInfothekPruefung
  224. */
  225. private $protokoll_infothek_pruefung;
  226. /**
  227. * @var \Doctrine\Common\Collections\Collection
  228. */
  229. private $similarities;
  230. /**
  231. * @var \Doctrine\Common\Collections\Collection
  232. */
  233. private $emails;
  234. /**
  235. *
  236. * @var \Doctrine\Common\Collections\Collection
  237. * @Assert\Count(
  238. * max = "5",
  239. * maxMessage = "Es dürfen höchstens {{ limit }} Gesetze angegeben werden.",
  240. * groups = {"admin"}
  241. * )
  242. * @Assert\Valid()
  243. */
  244. private $protokoll_gesetze;
  245. /**
  246. * @Assert\IsFalse(
  247. * message = "Es muss mindestens ein Paragraph angegeben werden.",
  248. * groups = {"finish"}
  249. * )
  250. * changedFrom Assert\False
  251. */
  252. public function isProtokollGesetzeEmpty()
  253. {
  254. foreach ($this->getProtokollGesetze() as $pg) {
  255. if (!$pg->isEmpty()) {
  256. return false;
  257. }
  258. }
  259. return true;
  260. }
  261. /**
  262. * Get id
  263. *
  264. * @return integer
  265. */
  266. public function getId()
  267. {
  268. return $this->id;
  269. }
  270. /**
  271. * Set sortierung
  272. *
  273. * @param integer $sortierung
  274. * @return ProtokollInfothekPruefer
  275. */
  276. public function setSortierung($sortierung)
  277. {
  278. $this->sortierung = $sortierung;
  279. return $this;
  280. }
  281. /**
  282. * Get sortierung
  283. *
  284. * @return integer
  285. */
  286. public function getSortierung()
  287. {
  288. return $this->sortierung;
  289. }
  290. /**
  291. * Set fach
  292. *
  293. * @param string $fach
  294. * @return ProtokollInfothekPruefer
  295. */
  296. public function setFach($fach)
  297. {
  298. $this->fach = PrueferPruefung::unifyFach($fach);
  299. return $this;
  300. }
  301. /**
  302. * Get fach
  303. *
  304. * @return string
  305. */
  306. public function getFach()
  307. {
  308. return $this->fach;
  309. }
  310. /**
  311. * Set person_verhalten
  312. *
  313. * @param integer $personVerhalten
  314. * @return ProtokollInfothekPruefer
  315. */
  316. public function setPersonVerhalten($personVerhalten)
  317. {
  318. $this->person_verhalten = $personVerhalten;
  319. return $this;
  320. }
  321. /**
  322. * Get person_verhalten
  323. *
  324. * @return integer
  325. */
  326. public function getPersonVerhalten()
  327. {
  328. return $this->person_verhalten;
  329. }
  330. /**
  331. * Set person_fuehrt
  332. *
  333. * @param integer $personFuehrt
  334. * @return ProtokollInfothekPruefer
  335. */
  336. public function setPersonFuehrt($personFuehrt)
  337. {
  338. $this->person_fuehrt = $personFuehrt;
  339. return $this;
  340. }
  341. /**
  342. * Get person_fuehrt
  343. *
  344. * @return integer
  345. */
  346. public function getPersonFuehrt()
  347. {
  348. return $this->person_fuehrt;
  349. }
  350. /**
  351. * Set person_notengebung
  352. *
  353. * @param integer $personNotengebung
  354. * @return ProtokollInfothekPruefer
  355. */
  356. public function setPersonNotengebung($personNotengebung)
  357. {
  358. $this->person_notengebung = $personNotengebung;
  359. return $this;
  360. }
  361. /**
  362. * Get person_notengebung
  363. *
  364. * @return integer
  365. */
  366. public function getPersonNotengebung()
  367. {
  368. return $this->person_notengebung;
  369. }
  370. /**
  371. * Set person_eindruck
  372. *
  373. * @param integer $personEindruck
  374. * @return ProtokollInfothekPruefer
  375. */
  376. public function setPersonEindruck($personEindruck)
  377. {
  378. $this->person_eindruck = $personEindruck;
  379. return $this;
  380. }
  381. /**
  382. * Get person_eindruck
  383. *
  384. * @return integer
  385. */
  386. public function getPersonEindruck()
  387. {
  388. return $this->person_eindruck;
  389. }
  390. /**
  391. * Set person_lang
  392. *
  393. * @param string $personLang
  394. * @return ProtokollInfothekPruefer
  395. */
  396. public function setPersonLang($personLang)
  397. {
  398. $this->person_lang = $personLang;
  399. return $this;
  400. }
  401. /**
  402. * Get person_lang
  403. *
  404. * @return string
  405. */
  406. public function getPersonLang()
  407. {
  408. return $this->person_lang;
  409. }
  410. /**
  411. * Set sache_stoff
  412. *
  413. * @param integer $sacheStoff
  414. * @return ProtokollInfothekPruefer
  415. */
  416. public function setSacheStoff($sacheStoff)
  417. {
  418. $this->sache_stoff = $sacheStoff;
  419. return $this;
  420. }
  421. /**
  422. * Get sache_stoff
  423. *
  424. * @return integer
  425. */
  426. public function getSacheStoff()
  427. {
  428. return $this->sache_stoff;
  429. }
  430. /**
  431. * Set sache_themen
  432. *
  433. * @param string $sacheThemen
  434. * @return ProtokollInfothekPruefer
  435. */
  436. public function setSacheThemen($sacheThemen)
  437. {
  438. $this->sache_themen = $sacheThemen;
  439. return $this;
  440. }
  441. /**
  442. * Get sache_themen
  443. *
  444. * @return string
  445. */
  446. public function getSacheThemen()
  447. {
  448. return $this->sache_themen;
  449. }
  450. /**
  451. * Set sache_gespraech
  452. *
  453. * @param integer $sacheGespraech
  454. * @return ProtokollInfothekPruefer
  455. */
  456. public function setSacheGespraech($sacheGespraech)
  457. {
  458. $this->sache_gespraech = $sacheGespraech;
  459. return $this;
  460. }
  461. /**
  462. * Get sache_gespraech
  463. *
  464. * @return integer
  465. */
  466. public function getSacheGespraech()
  467. {
  468. return $this->sache_gespraech;
  469. }
  470. /**
  471. * Set sache_lang
  472. *
  473. * @param string $sacheLang
  474. * @return ProtokollInfothekPruefer
  475. */
  476. public function setSacheLang($sacheLang)
  477. {
  478. $this->sache_lang = $sacheLang;
  479. return $this;
  480. }
  481. /**
  482. * Get sache_lang
  483. *
  484. * @return string
  485. */
  486. public function getSacheLang()
  487. {
  488. return $this->sache_lang;
  489. }
  490. /**
  491. * Set pruefer [OWNING SIDE]
  492. *
  493. * @param \JF\JuridicusBundle\Entity\Pruefer $pruefer
  494. * @return ProtokollInfothekPruefer
  495. */
  496. public function setPruefer(Pruefer $pruefer = null)
  497. {
  498. $this->pruefer = $pruefer;
  499. return $this;
  500. }
  501. /**
  502. * Get pruefer
  503. *
  504. * @return \JF\JuridicusBundle\Entity\Pruefer
  505. */
  506. public function getPruefer()
  507. {
  508. return $this->pruefer;
  509. }
  510. /**
  511. * Set protokoll_infothek_pruefung [OWNING SIDE]
  512. *
  513. * @param \JF\JuridicusBundle\Entity\ProtokollInfothekPruefung $protokollInfothekPruefung
  514. * @return ProtokollInfothekPruefer
  515. */
  516. public function setProtokollInfothekPruefung(ProtokollInfothekPruefung $protokollInfothekPruefung = null)
  517. {
  518. $this->protokoll_infothek_pruefung = $protokollInfothekPruefung;
  519. return $this;
  520. }
  521. /**
  522. * Get protokoll_infothek_pruefung
  523. *
  524. * @return \JF\JuridicusBundle\Entity\ProtokollInfothekPruefung
  525. */
  526. public function getProtokollInfothekPruefung()
  527. {
  528. return $this->protokoll_infothek_pruefung;
  529. }
  530. /**
  531. * Set pdf_protokoll_infothek_pruefer [INVERSE SIDE]
  532. *
  533. * @param \JF\JuridicusBundle\Entity\PdfProtokollInfothekPruefer $pdfProtokollInfothekPruefer
  534. * @return ProtokollInfothekPruefer
  535. */
  536. public function setPdfProtokollInfothekPruefer(PdfProtokollInfothekPruefer $pdfProtokollInfothekPruefer = null)
  537. {
  538. $this->pdf_protokoll_infothek_pruefer = $pdfProtokollInfothekPruefer;
  539. return $this;
  540. }
  541. /**
  542. * Get pdf_protokoll_infothek_pruefer
  543. *
  544. * @return \JF\JuridicusBundle\Entity\PdfProtokollInfothekPruefer
  545. */
  546. public function getPdfProtokollInfothekPruefer()
  547. {
  548. return $this->pdf_protokoll_infothek_pruefer;
  549. }
  550. /**
  551. * String Representation
  552. *
  553. * @return string
  554. */
  555. public function __toString()
  556. {
  557. return sprintf('Protokoll Infothek Prüfer #%s', $this->id);
  558. }
  559. /**
  560. * addToPdf
  561. *
  562. * @param \TCPDF $pdf
  563. */
  564. public function addToPdf(\TCPDF & $pdf)
  565. {
  566. $width = 50;
  567. $nwidth = 10;
  568. $protokoll_infothek_pruefung = $this->getProtokollInfothekPruefung();
  569. // Basisdaten einfügen
  570. $protokoll_infothek_pruefung->addBaseToPdf($pdf, $this->sortierung);
  571. $pdf->Cell($width, 0, "Prüfungsfach (-fächer)");
  572. $pdf->Cell(0, 0, $this->fach, 0, 1);
  573. $pdf->Ln(5);
  574. $pdf->writeHTML("<h3>Die Prüfung im Einzelnen</h3>");
  575. $pdf->Ln(5);
  576. // Notentabelle einfügen
  577. $protokoll_infothek_pruefung->addNotenToPdf($pdf);
  578. $pdf->Ln(5);
  579. $pdf->writeHTML("<h3>Zur Person:</h3>");
  580. $pdf->Ln(5);
  581. $pdf->Cell($nwidth, 0, '1.');
  582. $pdf->Cell($width, 0, 'Prüfungsverhalten');
  583. foreach (Juridicus::pick($this->person_verhalten, self::$person_verhalten_options) AS $option) {
  584. $pdf->Cell(0, 0, $option, 0, 2);
  585. }
  586. $pdf->Ln(0);
  587. if (isset($this->person_fuehrt)) {
  588. $pdf->Cell($nwidth, 0, '');
  589. $pdf->Cell($width, 0, 'führt');
  590. $pdf->Cell(0, 0, $this->getPersonFuehrtString(), 0, 1);
  591. }
  592. if (isset($this->person_notengebung)) {
  593. $pdf->Cell($nwidth, 0, '2.');
  594. $pdf->Cell($width, 0, 'Notengebung');
  595. $pdf->Cell(0, 0, $this->getPersonNotengebungString(), 0, 1);
  596. }
  597. if (isset($this->person_eindruck)) {
  598. $pdf->Cell($nwidth, 0, '3.');
  599. $pdf->Cell($width, 0, 'Gesamteindruck');
  600. $pdf->Cell(0, 0, sprintf('%s (1 = ideal ... 5 = äußerst unangenehm)', $this->person_eindruck), 0, 1);
  601. }
  602. $pdf->Ln(5);
  603. $pdf->writeHTML("<h3>Zur Sache:</h3>");
  604. $pdf->Ln(5);
  605. $pdf->Cell($nwidth, 0, '1.');
  606. if (!empty($this->sache_stoff)) {
  607. $selected = Juridicus::pick($this->sache_stoff, self::$sache_stoff_options);
  608. $pdf->Cell($width, 0, 'Prüfungsstoff');
  609. $pdf->Cell(0, 0, implode(", ", $selected), 0, 1);
  610. $pdf->Cell($nwidth, 0, '');
  611. }
  612. $pdf->Cell($width, 0, 'Prüfungsthemen');
  613. $pdf->writeHTMLCell(0, 0, '', '', $this->sache_themen, 0, 1);
  614. $paragraphen = array();
  615. foreach($this->getProtokollGesetze() as $protokoll_gesetz) {
  616. /* @var $protokoll_gesetz \JF\JuridicusBundle\Entity\ProtokollGesetz */
  617. $paragraphen[] = sprintf('<a href="%s">%s</a>',
  618. $protokoll_gesetz->getAbsoluteLink(),
  619. $protokoll_gesetz->getKurzbezeichnung()
  620. );
  621. }
  622. if (!empty($paragraphen)) {
  623. $pdf->Cell($nwidth, 0, '');
  624. $pdf->Cell($width, 0, 'Paragraphen');
  625. $pdf->writeHTMLCell(0, 0, '', '', \implode(', ', $paragraphen), 0, 1);
  626. }
  627. $pdf->Cell($nwidth, 0, '2.');
  628. $pdf->Cell($width, 0, 'Prüfungsgespräch');
  629. foreach (Juridicus::pick($this->sache_gespraech, self::$sache_gespraech_options) AS $option) {
  630. $pdf->Cell(0, 0, $option, 0, 2);
  631. }
  632. $pdf->Ln(5);
  633. $pdf->writeHTML("<h3>Zur Person des Prüfers (ausführlich)</h3>");
  634. $pdf->Ln(5);
  635. $pdf->writeHTML($this->person_lang);
  636. $pdf->Ln(5);
  637. $pdf->writeHTML("<h3>Zur Sache (ausführlich)</h3>");
  638. $pdf->Ln(5);
  639. $pdf->writeHTML($this->sache_lang);
  640. $pdf->Ln(5);
  641. $pdf->lastPage();
  642. }
  643. /**
  644. * Konstructor.
  645. */
  646. public function __construct()
  647. {
  648. $this->similarities = new ArrayCollection();
  649. $this->emails = new ArrayCollection();
  650. $this->protokoll_gesetze = new ArrayCollection();
  651. }
  652. /**
  653. * Add similarities
  654. *
  655. * @param \JF\JuridicusBundle\Entity\Similarity $similarities
  656. * @return ProtokollInfothekPruefer
  657. */
  658. public function addSimilaritie(Similarity $similarities)
  659. {
  660. $this->similarities[] = $similarities;
  661. return $this;
  662. }
  663. /**
  664. * Remove similarities
  665. *
  666. * @param \JF\JuridicusBundle\Entity\Similarity $similarities
  667. */
  668. public function removeSimilaritie(Similarity $similarities)
  669. {
  670. $this->similarities->removeElement($similarities);
  671. }
  672. /**
  673. * Get similarities
  674. *
  675. * @return \Doctrine\Common\Collections\Collection
  676. */
  677. public function getSimilarities()
  678. {
  679. return $this->similarities;
  680. }
  681. /**
  682. * Add emails
  683. *
  684. * @param \JF\JuridicusBundle\Entity\Email $emails
  685. * @return ProtokollInfothekPruefer
  686. */
  687. public function addEmail(Email $emails)
  688. {
  689. $this->emails[] = $emails;
  690. return $this;
  691. }
  692. /**
  693. * Remove emails
  694. *
  695. * @param \JF\JuridicusBundle\Entity\Email $emails
  696. */
  697. public function removeEmail(Email $emails)
  698. {
  699. $this->emails->removeElement($emails);
  700. }
  701. /**
  702. * Get emails
  703. *
  704. * @return \Doctrine\Common\Collections\Collection
  705. */
  706. public function getEmails()
  707. {
  708. return $this->emails;
  709. }
  710. /**
  711. * Add protokoll_gesetze
  712. *
  713. * @param \JF\JuridicusBundle\Entity\ProtokollGesetz $protokollGesetz
  714. * @return ProtokollInfothekPruefer
  715. */
  716. public function addProtokollGesetze(ProtokollGesetz $protokollGesetz)
  717. {
  718. $this->protokoll_gesetze[] = $protokollGesetz;
  719. $protokollGesetz->setProtokollInfothekPruefer($this);
  720. return $this;
  721. }
  722. /**
  723. * Remove protokoll_gesetze
  724. *
  725. * @param \JF\JuridicusBundle\Entity\ProtokollGesetz $protokollGesetz
  726. */
  727. public function removeProtokollGesetze(ProtokollGesetz $protokollGesetz)
  728. {
  729. $this->protokoll_gesetze->removeElement($protokollGesetz);
  730. }
  731. /**
  732. * Get protokoll_gesetze
  733. *
  734. * @return \Doctrine\Common\Collections\Collection
  735. */
  736. public function getProtokollGesetze()
  737. {
  738. return $this->protokoll_gesetze;
  739. }
  740. /**
  741. *
  742. * @param integer $limit
  743. */
  744. public function expandProtokollGesetze($limit = 5)
  745. {
  746. $pg_count = $this->getProtokollGesetze()->count();
  747. for ($i = $pg_count + 1; $i <= $limit; $i++) {
  748. $pg = new ProtokollGesetz();
  749. $pg->setSortierung($i);
  750. $this->addProtokollGesetze($pg);
  751. }
  752. }
  753. /**
  754. *
  755. */
  756. public function removeEmptyProtokollGesetze()
  757. {
  758. foreach($this->getProtokollGesetze() as $pg) {
  759. if ($pg->isEmpty()) {
  760. $this->removeProtokollGesetze($pg);
  761. }
  762. }
  763. }
  764. }