Example #1
0
 public static function registerApplication()
 {
     School::registerModule();
     Responsibility::registerModule();
     SponsorAssociation::registerModule();
     Main::getDisplay()->addApplicationNavigation(new Link(new Link\Route(__NAMESPACE__), new Link\Name('Mandant'), new Link\Icon(new Building())));
     Main::getDispatcher()->registerRoute(Main::getDispatcher()->createRoute(__NAMESPACE__, __CLASS__ . '::frontendDashboard'));
     $tblSchoolAll = School::useService()->getSchoolAll();
     if ($tblSchoolAll) {
         /** @var TblSchool $tblSchool */
         foreach ((array) $tblSchoolAll as $Index => $tblSchool) {
             $tblSchoolAll[$tblSchool->getServiceTblCompany()->getName() . $tblSchool->getTblType()->getName()] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn($tblSchool->getServiceTblCompany()->getName() . new Muted(new Small('<br/>' . $tblSchool->getTblType()->getName())), 12)))));
             $tblSchoolAll[$Index] = false;
         }
         $tblSchoolAll = array_filter($tblSchoolAll);
     }
     $tblResponsibilityAll = Responsibility::useService()->getResponsibilityAll();
     if ($tblResponsibilityAll) {
         /** @var TblResponsibility $tblResponsibility */
         foreach ((array) $tblResponsibilityAll as $Index => $tblResponsibility) {
             $tblResponsibilityAll[$tblResponsibility->getServiceTblCompany()->getName()] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn($tblResponsibility->getServiceTblCompany()->getName() . new Muted(new Small('<br/>' . $tblResponsibility->getServiceTblCompany()->getDescription())), 12)))));
             $tblResponsibilityAll[$Index] = false;
         }
         $tblResponsibilityAll = array_filter($tblResponsibilityAll);
     }
     $tblSponsorAssociationAll = SponsorAssociation::useService()->getSponsorAssociationAll();
     if ($tblSponsorAssociationAll) {
         /** @var TblSponsorAssociation $tblSponsorAssociation */
         foreach ((array) $tblSponsorAssociationAll as $Index => $tblSponsorAssociation) {
             $tblSponsorAssociationAll[$tblSponsorAssociation->getServiceTblCompany()->getName()] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn($tblSponsorAssociation->getServiceTblCompany()->getName() . new Muted(new Small('<br/>' . $tblSponsorAssociation->getServiceTblCompany()->getDescription())), 12)))));
             $tblSponsorAssociationAll[$Index] = false;
         }
         $tblSponsorAssociationAll = array_filter($tblSponsorAssociationAll);
     }
     if (empty($tblSchoolAll)) {
         $tblSchoolAll = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(array(new Muted('Kein Eintrag'), new PullRight(new Standard(new Pencil(), '/Setting/Consumer/School/Create'))), 12)))));
     }
     if (empty($tblResponsibilityAll)) {
         $tblResponsibilityAll = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(array(new Muted('Kein Eintrag'), new PullRight(new Standard(new Pencil(), '/Setting/Consumer/Responsibility/Create'))), 12)))));
     }
     if (empty($tblSponsorAssociationAll)) {
         $tblSponsorAssociationAll = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn(array(new Muted('Kein Eintrag'), new PullRight(new Standard(new Pencil(), '/Setting/Consumer/SponsorAssociation/Create'))), 12)))));
     }
     Main::getDispatcher()->registerWidget('Consumer', new Panel('Schule', $tblSchoolAll), 2, 2);
     Main::getDispatcher()->registerWidget('Consumer', new Panel('Schulträger', $tblResponsibilityAll), 2, 2);
     Main::getDispatcher()->registerWidget('Consumer', new Panel('Förderverein', $tblSponsorAssociationAll), 2, 2);
 }
Example #2
0
 /**
  * @return Form
  */
 private function formResponsibilityCompanyDelete()
 {
     $PanelSelectCompanyTitle = new PullClear('Implementierte Schulträger:');
     $tblResponsibilityAll = Responsibility::useService()->getResponsibilityAll();
     array_walk($tblResponsibilityAll, function (TblResponsibility &$tblResponsibility) {
         $tblCompany = $tblResponsibility->getServiceTblCompany();
         $tblResponsibility = new PullClear(new RadioBox('Responsibility', $tblCompany->getName() . ' ' . new Success($tblCompany->getDescription()), $tblResponsibility->getId()));
     });
     return new Form(new FormGroup(array(new FormRow(array(new FormColumn(array(new Panel($PanelSelectCompanyTitle, $tblResponsibilityAll, Panel::PANEL_TYPE_INFO, null, 15)), 12))))));
 }