public function frontendGroup($Id = false)
 {
     $Stage = new Stage('Firmensuche', 'nach Firmengruppe');
     $tblGroup = Group::useService()->getGroupById($Id);
     if ($tblGroup) {
         $Stage->setMessage(new PullClear(new Bold($tblGroup->getName()) . ' ' . new Small($tblGroup->getDescription())) . new PullClear(new Danger(new Italic(nl2br($tblGroup->getRemark())))));
     } else {
         $Stage->setMessage('Bitte wählen Sie eine Firmengruppe');
     }
     $tblGroupAll = Group::useService()->getGroupAll();
     /** @noinspection PhpUnusedParameterInspection */
     array_walk($tblGroupAll, function (TblGroup &$tblGroup, $Index, Stage $Stage) {
         $Stage->addButton(new Standard($tblGroup->getName(), new Link\Route(__NAMESPACE__ . '/Group'), null, array('Id' => $tblGroup->getId()), $tblGroup->getDescription()));
     }, $Stage);
     if ($tblGroup) {
         $Stage->setMessage(new PullClear(new Bold($tblGroup->getName()) . ' ' . new Small($tblGroup->getDescription())) . new PullClear(new Danger(new Italic(nl2br($tblGroup->getRemark())))));
         $tblCompanyAll = Group::useService()->getCompanyAllByGroup($tblGroup);
     } else {
         $Stage->setMessage('Bitte wählen Sie eine Firmengruppe');
         $tblCompanyAll = Group::useService()->getCompanyAllHavingNoGroup();
     }
     if ($tblCompanyAll) {
         array_walk($tblCompanyAll, function (TblCompany &$tblCompany) {
             $tblCompany->Option = new Standard('', '/Corporation/Company', new Pencil(), array('Id' => $tblCompany->getId()), 'Bearbeiten');
         });
         $Layout = array(new LayoutRow(new LayoutColumn(new TableData($tblCompanyAll, null, array('Id' => '#', 'Name' => 'Firmenname', 'Option' => 'Optionen')))));
         if (!$tblGroup) {
             array_unshift($Layout, new LayoutRow(new LayoutColumn(new DangerMessage('Folgende Firmen sind keiner Gruppe zugewiesen'))));
         }
         $Stage->setContent(new Layout(new LayoutGroup($Layout)));
     }
     return $Stage;
 }
 /**
  * @param TblPerson $tblPerson
  * @param array     $Meta
  *
  * @return Stage
  */
 public function frontendMeta(TblPerson $tblPerson = null, $Meta = array())
 {
     $Stage = new Stage();
     $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.'));
     $tblCompanyAllSchool = Group::useService()->getCompanyAllByGroup(Group::useService()->getGroupByMetaTable('SCHOOL'));
     array_push($tblCompanyAllSchool, new TblCompany());
     if (null !== $tblPerson) {
         $Global = $this->getGlobal();
         if (!isset($Global->POST['Meta'])) {
             /** @var TblProspect $tblProspect */
             $tblProspect = Prospect::useService()->getProspectByPerson($tblPerson);
             if ($tblProspect) {
                 $Global->POST['Meta']['Remark'] = $tblProspect->getRemark();
                 /** @var TblProspectAppointment $tblProspectAppointment */
                 $tblProspectAppointment = $tblProspect->getTblProspectAppointment();
                 if ($tblProspectAppointment) {
                     $Global->POST['Meta']['Appointment']['ReservationDate'] = $tblProspectAppointment->getReservationDate();
                     $Global->POST['Meta']['Appointment']['InterviewDate'] = $tblProspectAppointment->getInterviewDate();
                     $Global->POST['Meta']['Appointment']['TrialDate'] = $tblProspectAppointment->getTrialDate();
                 }
                 /** @var TblProspectReservation $tblProspectReservation */
                 $tblProspectReservation = $tblProspect->getTblProspectReservation();
                 if ($tblProspectReservation) {
                     $Global->POST['Meta']['Reservation']['Year'] = $tblProspectReservation->getReservationYear();
                     $Global->POST['Meta']['Reservation']['Division'] = $tblProspectReservation->getReservationDivision();
                     $Global->POST['Meta']['Reservation']['SchoolOptionA'] = $tblProspectReservation->getServiceTblCompanyOptionA() ? $tblProspectReservation->getServiceTblCompanyOptionA()->getId() : 0;
                     $Global->POST['Meta']['Reservation']['SchoolOptionB'] = $tblProspectReservation->getServiceTblCompanyOptionB() ? $tblProspectReservation->getServiceTblCompanyOptionB()->getId() : 0;
                 }
                 $Global->savePost();
             }
         }
     }
     $Stage->setContent(Prospect::useService()->createMeta((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(array(new Panel('Termine', array(new DatePicker('Meta[Appointment][ReservationDate]', 'Eingangsdatum', 'Eingangsdatum', new Calendar()), new DatePicker('Meta[Appointment][InterviewDate]', 'Aufnahmegespräch', 'Aufnahmegespräch', new Calendar()), new DatePicker('Meta[Appointment][TrialDate]', 'Schnuppertag', 'Schnuppertag', new Calendar())), Panel::PANEL_TYPE_INFO)), 3), new FormColumn(array(new Panel('Voranmeldung für', array(new TextField('Meta[Reservation][Year]', 'Schuljahr', 'Schuljahr'), new TextField('Meta[Reservation][Division]', 'Klassenstufe', 'Klassenstufe'), new SelectBox('Meta[Reservation][SchoolOptionA]', 'Schule: Option 1', array('{{ Name }} {{ Description }}' => $tblCompanyAllSchool), new Education()), new SelectBox('Meta[Reservation][SchoolOptionB]', 'Schule: Option 2', array('{{ Name }} {{ Description }}' => $tblCompanyAllSchool), new Education())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Sonstiges', array(new TextArea('Meta[Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO)), 5)))))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.'), $tblPerson, $Meta));
     return $Stage;
 }
 /**
  * @return bool|TblGroup
  */
 public function getTblGroup()
 {
     if (null === $this->tblGroup) {
         return false;
     } else {
         return Group::useService()->getGroupById($this->tblGroup);
     }
 }
 /**
  * @return Stage
  */
 public function frontendMeta(TblPerson $tblPerson = null, $Meta = array())
 {
     $Stage = new Stage();
     $tblCompanyAllSchool = Group::useService()->getCompanyAllByGroup(Group::useService()->getGroupByMetaTable('SCHOOL'));
     array_push($tblCompanyAllSchool, new TblCompany());
     $Stage->setMessage(new Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.'));
     $Stage->setContent((new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new Panel(new Hospital() . ' Krankenakte', array(new TextArea('Meta[MedicalRecord][Disease]', 'Krankheiten / Allergien', 'Krankheiten / Allergien', new Heart()), new TextArea('Meta[MedicalRecord][Medication]', 'Mediakamente', 'Mediakamente', new Medicine()), new SelectBox('Meta[MedicalRecord][AttendingDoctor]', 'Behandelnder Arzt', array(), new Stethoscope()), new SelectBox('Meta[MedicalRecord][InsuranceState]', 'Versicherungsstatus', array(0 => '', 1 => 'Pflicht', 2 => 'Freiwillig', 3 => 'Privat', 4 => 'Familie Vater', 5 => 'Familie Mutter'), new Lock()), new AutoCompleter('Meta[MedicalRecord][Insurance]', 'Krankenkasse', 'Krankenkasse', array(), new Shield())), Panel::PANEL_TYPE_DANGER), 3), new FormColumn(new Panel('Schulbeförderung', array(new TextField('Meta[Transport][Route]', 'Buslinie', 'Buslinie', new Bus()), new TextField('Meta[Transport][Station][Entrance]', 'Einstiegshaltestelle', 'Einstiegshaltestelle', new StopSign()), new TextField('Meta[Transport][Station][Exit]', 'Ausstiegshaltestelle', 'Ausstiegshaltestelle', new StopSign()), new TextArea('Meta[Transport][Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO), 3), new FormColumn(array(new Panel('Sonstiges', array(new DatePicker('Meta[Additional][BaptismDate]', 'Taufdatum', 'Taufdatum', new TempleChurch()), new TextField('Meta[Additional][BaptismLocation]', 'Taufort', 'Taufort', new MapMarker()), new TextField('Meta[Additional][Locker][Number]', 'Schließfachnummer', 'Schließfachnummer', new Lock()), new TextField('Meta[Additional][Locker][Location]', 'Schließfach Standort', 'Schließfach Standort', new MapMarker()), new TextField('Meta[Additional][Locker][Key]', 'Schlüssel Nummer', 'Schlüssel Nummer', new Key())), Panel::PANEL_TYPE_INFO)), 3), new FormColumn(array(new Panel('Erlaubnis zur Nutzung des Schüler-Fotos', array(new CheckBox('Meta[PicturePermission][Internal]', 'Schulschriften', 1), new CheckBox('Meta[PicturePermission][External]', 'Veröffentlichungen', 1), new CheckBox('Meta[PicturePermission][Internet]', 'Internetpräsenz', 1), new CheckBox('Meta[PicturePermission][Facebook]', 'Facebookseite', 1), new CheckBox('Meta[PicturePermission][Press]', 'Druckpresse', 1), new CheckBox('Meta[PicturePermission][Multimedia]', 'Ton/Video/Film', 1), new CheckBox('Meta[PicturePermission][Promotion]', 'Werbung in eigener Sache', 1)), Panel::PANEL_TYPE_INFO)), 3))), new FormRow(array(new FormColumn(new Panel('Integration 1', array(new CheckBox('Meta[Integration][CoachingRequired]', 'Förderbedarf', 1), new Aspect('Förderschwerpunkte:'), new CheckBox('Meta[Integration][PracticeModule][1]', 'Schwerpunkt A', 1), new CheckBox('Meta[Integration][PracticeModule][2]', 'Schwerpunkt B', 1), new CheckBox('Meta[Integration][PracticeModule][3]', 'Schwerpunkt C', 1), new Aspect('Teilleistungsstörungen:'), new CheckBox('Meta[Integration][Disorder][1]', 'Störung A', 1), new CheckBox('Meta[Integration][Disorder][2]', 'Störung B', 1), new CheckBox('Meta[Integration][Disorder][3]', 'Störung C', 1), new CheckBox('Meta[Integration][Disorder][4]', 'Störung D', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Störung E', 1)), Panel::PANEL_TYPE_INFO), 4), new FormColumn(new Panel('Integration 2', array(new DatePicker('Meta[Integration][CoachingCounselDate]', 'Förderantrag Beratung', 'Förderantrag Beratung', new Calendar()), new DatePicker('Meta[Integration][CoachingRequestDate]', 'Förderantrag', 'Förderantrag', new Calendar()), new DatePicker('Meta[Integration][CoachingDecisionDate]', 'Förderbescheid SBA', 'Förderbescheid SBA', new Calendar())), Panel::PANEL_TYPE_INFO), 4), new FormColumn(new Panel('Integration 3', array(new SelectBox('Meta[Integration][3]', 'Förderschule', array('Name' => $tblCompanyAllSchool), new Education()), new SelectBox('Meta[Integration][3]', 'Schulbegleitung', array(), new Person()), new NumberField('Meta[Integration][3]', 'Stundenbedarf pro Woche', 'Stundenbedarf pro Woche', new Clock()), new TextArea('Meta[Integration][Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO), 4))), new FormRow(array(new FormColumn(array(new Panel('Ersteinschulung', array(new SelectBox('Meta[Transfer][1]', 'Schule', array('Name' => $tblCompanyAllSchool)), new DatePicker('Meta[Transfer][2]', 'Datum', 'Datum', new Calendar()), new TextArea('Meta[Transfer][1]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Schülertransfer - Aufnahme', array(new SelectBox('Meta[Transfer][0]', 'Letzte Schulart', array()), new SelectBox('Meta[Transfer][1]', 'Abgebende Schule', array('Name' => $tblCompanyAllSchool)), new DatePicker('Meta[Transfer][2]', 'Datum', 'Datum', new Calendar())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Schülertransfer - Aufnahme', array(new SelectBox('Meta[Transfer][0]', 'Letzte Schulart', array()), new SelectBox('Meta[Transfer][1]', 'Abgebende Schule', array('Name' => $tblCompanyAllSchool)), new DatePicker('Meta[Transfer][2]', 'Datum', 'Datum', new Calendar())), Panel::PANEL_TYPE_INFO)), 4))), new FormRow(array(new FormColumn(array(new Panel('Schülertransfer - Schulverlauf', array(new TextArea('Meta[Transfer][1]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO)))))))), new Primary('Informationen speichern')))->setConfirm('Eventuelle Änderungen wurden noch nicht gespeichert.'));
     return $Stage;
 }
 public static function registerCluster()
 {
     Search::registerApplication();
     Company::registerApplication();
     Group::registerApplication();
     Main::getDisplay()->addClusterNavigation(new Link(new Link\Route(__NAMESPACE__), new Link\Name('Firmen')));
     Main::getDispatcher()->registerRoute(Main::getDispatcher()->createRoute(__NAMESPACE__, __CLASS__ . '::frontendDashboard'));
     $tblGroupAll = Group::useService()->getGroupAll();
     if ($tblGroupAll) {
         /** @var TblGroup $tblGroup */
         foreach ((array) $tblGroupAll as $Index => $tblGroup) {
             $tblGroupAll[$tblGroup->getName()] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn($tblGroup->getName() . new Muted(new Small('<br/>' . $tblGroup->getDescription())), array(9, 0, 7)), new LayoutColumn(new Muted(new Small(Group::useService()->countCompanyAllByGroup($tblGroup) . '&nbsp;Mitglieder')), 2, array(LayoutColumn::GRID_OPTION_HIDDEN_SM, LayoutColumn::GRID_OPTION_HIDDEN_XS)), new LayoutColumn(new PullRight(new Standard('', '/Corporation/Search/Group', new \SPHERE\Common\Frontend\Icon\Repository\Group(), array('Id' => $tblGroup->getId()), 'zur Gruppe')), array(3, 0, 3))))));
             $tblGroupAll[$Index] = false;
         }
         $tblGroupAll = array_filter($tblGroupAll);
         Main::getDispatcher()->registerWidget('Firmen', new Panel('Firmen in Gruppen', $tblGroupAll), 4, 6);
     }
     $tblCompanyAll = Company::useService()->getCompanyAll();
     Main::getDispatcher()->registerWidget('Firmen', new Panel('Anzahl an Firmen', 'Insgesamt: ' . count($tblCompanyAll)));
 }
Beispiel #6
0
 /**
  * @param IFormInterface $Form
  * @param TblCompany     $tblCompany
  * @param array          $Company
  *
  * @return IFormInterface|Redirect
  */
 public function updateCompany(IFormInterface $Form = null, TblCompany $tblCompany, $Company)
 {
     /**
      * Skip to Frontend
      */
     if (null === $Company) {
         return $Form;
     }
     $Error = false;
     if (isset($Company['Name']) && empty($Company['Name'])) {
         $Form->setError('Company[Name]', 'Bitte geben Sie einen Namen an');
         $Error = true;
     }
     if (!$Error) {
         if ((new Data($this->Binding))->updateCompany($tblCompany, $Company['Name'], $Company['Description'])) {
             // Change Groups
             if (isset($Company['Group'])) {
                 // Remove all Groups
                 $tblGroupList = Group::useService()->getGroupAllByCompany($tblCompany);
                 foreach ($tblGroupList as $tblGroup) {
                     Group::useService()->removeGroupCompany($tblGroup, $tblCompany);
                 }
                 // Add current Groups
                 foreach ((array) $Company['Group'] as $tblGroup) {
                     Group::useService()->addGroupCompany(Group::useService()->getGroupById($tblGroup), $tblCompany);
                 }
             } else {
                 // Remove all Groups
                 $tblGroupList = Group::useService()->getGroupAllByCompany($tblCompany);
                 foreach ($tblGroupList as $tblGroup) {
                     Group::useService()->removeGroupCompany($tblGroup, $tblCompany);
                 }
             }
             return new Success('Die Firma wurde erfolgreich aktualisiert') . new Redirect('/Corporation/Company', 1, array('Id' => $tblCompany->getId()));
         } else {
             return new Danger('Die Firma konnte nicht aktualisiert werden') . new Redirect('/Corporation/Company', 10);
         }
     }
     return $Form;
 }
 /**
  * @return bool|TblGroup[]
  */
 public function fetchTblGroupAll()
 {
     return Group::useService()->getGroupAllByCompany($this);
 }
 /**
  * @param int  $Id
  * @param bool $Confirm
  *
  * @return Stage
  */
 public function frontendDestroyGroup($Id, $Confirm = false)
 {
     $Stage = new Stage('Gruppe', 'Löschen');
     if ($Id) {
         $tblGroup = Group::useService()->getGroupById($Id);
         if (!$Confirm) {
             $Stage->setContent(new Layout(new LayoutGroup(new LayoutRow(new LayoutColumn(new Panel(new Question() . ' Diese Gruppe wirklich löschen?', array($tblGroup->getName() . ' ' . $tblGroup->getDescription(), new Muted(new Small($tblGroup->getRemark()))), Panel::PANEL_TYPE_DANGER, new Standard('Ja', '/Corporation/Group/Destroy', new Ok(), array('Id' => $Id, 'Confirm' => true)) . new Standard('Nein', '/Corporation/Group', new Disable())))))));
         } else {
             // Remove Group-Member
             $tblCompanyAll = Group::useService()->getCompanyAllByGroup($tblGroup);
             /** @noinspection PhpUnusedParameterInspection */
             array_walk($tblCompanyAll, function (TblCompany $tblCompany, $Index, TblGroup $tblGroup) {
                 Group::useService()->removeGroupCompany($tblGroup, $tblCompany);
             }, $tblGroup);
             // Destroy Group
             $Stage->setContent(new Layout(new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(Group::useService()->destroyGroup($tblGroup) ? new Success('Die Gruppe wurde gelöscht') . new Redirect('/Corporation/Group', 0) : new Danger('Die Gruppe konnte nicht gelöscht werden') . new Redirect('/Corporation/Group', 3))))))));
         }
     } else {
         $Stage->setContent(new Layout(new LayoutGroup(array(new LayoutRow(new LayoutColumn(array(new Danger('Die Gruppe konnte nicht gefunden werden'), new Redirect('/Corporation/Group', 3))))))));
     }
     return $Stage;
 }
 /**
  * @param TblPerson|null $tblPerson
  * @param array          $Meta
  *
  * @return FormGroup
  */
 private function formGroupIntegration(TblPerson $tblPerson = null, $Meta = array())
 {
     $tblCompanyAllSchool = Group::useService()->getCompanyAllByGroup(Group::useService()->getGroupByMetaTable('SCHOOL'));
     array_push($tblCompanyAllSchool, new TblCompany());
     return new FormGroup(array(new FormRow(array(new FormColumn(new Panel('Förderantrag / Förderbescheid', array(new CheckBox('Meta[Integration][CoachingRequired]', 'Förderbedarf', 1), new DatePicker('Meta[Integration][CoachingCounselDate]', 'Förderantrag Beratung', 'Förderantrag Beratung', new Calendar()), new DatePicker('Meta[Integration][CoachingRequestDate]', 'Förderantrag', 'Förderantrag', new Calendar()), new DatePicker('Meta[Integration][CoachingDecisionDate]', 'Förderbescheid SBA', 'Förderbescheid SBA', new Calendar())), Panel::PANEL_TYPE_INFO), 3), new FormColumn(new Panel('Förderschule', array(new SelectBox('Meta[Integration][3]', 'Förderschule', array('{{ Name }} {{ Description }}' => $tblCompanyAllSchool), new Education()), new SelectBox('Meta[Integration][3]', 'Schulbegleitung ' . new Small(new Muted('Integrationsbeauftragter')), array(), new Person()), new NumberField('Meta[Integration][3]', 'Stundenbedarf pro Woche', 'Stundenbedarf pro Woche', new Clock()), new TextArea('Meta[Integration][Remark]', 'Bemerkungen', 'Bemerkungen', new Pencil())), Panel::PANEL_TYPE_INFO), 3), new FormColumn(new Panel('Förderbedarf: Schwerpunkte', array(new CheckBox('Meta[Integration][PracticeModule][1]', 'Sprache', 1), new CheckBox('Meta[Integration][PracticeModule][1]', 'Körperlich-motorische Entwicklung', 1), new CheckBox('Meta[Integration][PracticeModule][1]', 'Sozial-emotionale Entwicklung', 1), new CheckBox('Meta[Integration][PracticeModule][1]', 'Hören', 1), new CheckBox('Meta[Integration][PracticeModule][1]', 'Sehen', 1), new CheckBox('Meta[Integration][PracticeModule][1]', 'Geistige Entwicklung', 1), new CheckBox('Meta[Integration][PracticeModule][1]', 'Lernen', 1)), Panel::PANEL_TYPE_INFO), 3), new FormColumn(new Panel('Förderbedarf: Teilleistungsstörungen', array(new CheckBox('Meta[Integration][Disorder][5]', 'LRS', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Gehörschwierigkeiten', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Augenleiden', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Sprachfehler', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Dyskalkulie', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Autismus', 1), new CheckBox('Meta[Integration][Disorder][5]', 'ADS / ADHS', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Rechenschwäche', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Hochbegabung', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Konzentrationsstörung', 1), new CheckBox('Meta[Integration][Disorder][5]', 'Körperliche Beeinträchtigung', 1)), Panel::PANEL_TYPE_INFO), 3)))), new Title('Integration'));
 }
Beispiel #10
0
 /**
  * @return \SPHERE\Application\Corporation\Group\Service
  */
 public static function useService()
 {
     return \SPHERE\Application\Corporation\Group\Group::useService();
 }
Beispiel #11
0
 /**
  * @return Form
  */
 private function formCompany()
 {
     $tblGroupList = Group::useService()->getGroupAll();
     if ($tblGroupList) {
         // Sort by Name
         usort($tblGroupList, function (TblGroup $ObjectA, TblGroup $ObjectB) {
             return strnatcmp($ObjectA->getName(), $ObjectB->getName());
         });
         // Create CheckBoxes
         /** @noinspection PhpUnusedParameterInspection */
         array_walk($tblGroupList, function (TblGroup &$tblGroup) {
             switch (strtoupper($tblGroup->getMetaTable())) {
                 case 'COMMON':
                     $Global = $this->getGlobal();
                     $Global->POST['Company']['Group'][$tblGroup->getId()] = $tblGroup->getId();
                     $Global->savePost();
                     $tblGroup = new RadioBox('Company[Group][' . $tblGroup->getId() . ']', $tblGroup->getName() . ' ' . new Muted(new Small($tblGroup->getDescription())), $tblGroup->getId());
                     break;
                 default:
                     $tblGroup = new CheckBox('Company[Group][' . $tblGroup->getId() . ']', $tblGroup->getName() . ' ' . new Muted(new Small($tblGroup->getDescription())), $tblGroup->getId());
             }
         });
     } else {
         $tblGroupList = array(new Warning('Keine Gruppen vorhanden'));
     }
     return new Form(new FormGroup(array(new FormRow(array(new FormColumn(new Panel('Firmenname', array(new TextField('Company[Name]', 'Name', 'Name'), new TextField('Company[Description]', 'Beschreibung', 'Beschreibung')), Panel::PANEL_TYPE_INFO), 8), new FormColumn(new Panel('Gruppen', $tblGroupList, Panel::PANEL_TYPE_INFO), 4))))));
 }
 /**
  * @return Form
  */
 private function formCompany()
 {
     $tblGroupList = Group::useService()->getGroupAll();
     if ($tblGroupList) {
         // Sort by Name
         usort($tblGroupList, function (TblGroup $ObjectA, TblGroup $ObjectB) {
             return strnatcmp($ObjectA->getName(), $ObjectB->getName());
         });
         // Create CheckBoxes
         /** @noinspection PhpUnusedParameterInspection */
         array_walk($tblGroupList, function (TblGroup &$tblGroup) {
             $tblGroup = new CheckBox('Company[Group][' . $tblGroup->getId() . ']', $tblGroup->getName() . ' ' . new Muted(new Small($tblGroup->getDescription())), $tblGroup->getId());
         });
     } else {
         $tblGroupList = array(new Warning('Keine Gruppen vorhanden'));
     }
     return new Form(new FormGroup(array(new FormRow(array(new FormColumn(new Panel('Firmenname', array(new TextField('Company[Name]', 'Name', 'Name')), Panel::PANEL_TYPE_INFO), 8), new FormColumn(new Panel('Gruppen', $tblGroupList, Panel::PANEL_TYPE_INFO), 4))))));
 }