Пример #1
0
 /**
  * @return Form
  */
 private function formRelationship()
 {
     $tblTypeAll = Relationship::useService()->getTypeAll();
     $tblPersonAll = Person::useService()->getPersonAll();
     array_walk($tblPersonAll, function (TblPerson &$tblPerson) {
         $tblPerson = new PullClear(new PullLeft(new RadioBox('To', $tblPerson->getFullName(), $tblPerson->getId())) . new PullRight(new Standard('', '/People/Person/Relationship/Create', new PersonIcon(), array('Id' => $tblPerson->getId()), 'zu' . ' ' . $tblPerson->getSalutation() . ' ' . $tblPerson->getTitle() . ' ' . $tblPerson->getLastName() . ' wechseln')));
     });
     return new Form(new FormGroup(array(new FormRow(array(new FormColumn(array(new Panel('hat folgende Beziehung', array(new SelectBox('Type[Type]', 'Beziehungstyp', array('{{ Name }} {{ Description }}' => $tblTypeAll), new TileBig()), new TextArea('Type[Remark]', 'Bemerkungen - z.B: Mutter / Vater / ..', 'Bemerkungen', new Pencil()), new \SPHERE\Common\Frontend\Text\Repository\Danger(new Info() . ' Es dürfen ausschließlich für die Schulverwaltung notwendige Informationen gespeichert werden.')), Panel::PANEL_TYPE_INFO)), 6), new FormColumn(array(new Panel(new PullClear('zu folgender Person' . new PullRight(new Standard('Neue Person anlegen', '/People/Person', new PersonIcon(), array(), 'Die aktuell gewählte Person verlassen'))), $tblPersonAll, Panel::PANEL_TYPE_INFO, null, 15)), 6))))));
 }