Ejemplo n.º 1
0
 public static function registerApplication()
 {
     Subject::registerModule();
     Division::registerModule();
     Main::getDisplay()->addApplicationNavigation(new Link(new Link\Route(__NAMESPACE__), new Link\Name('Unterricht')));
     Main::getDispatcher()->registerRoute(Main::getDispatcher()->createRoute(__NAMESPACE__, __CLASS__ . '::frontendDashboard'));
 }
 /**
  * @return bool|TblSubject
  */
 public function getTblSubject()
 {
     if (null === $this->tblSubject) {
         return false;
     } else {
         return Subject::useService()->getSubjectById($this->tblSubject);
     }
 }
 /**
  * @return bool|TblCategory
  */
 public function getTblCategory()
 {
     if (null === $this->tblCategory) {
         return false;
     } else {
         return Subject::useService()->getCategoryById($this->tblCategory);
     }
 }
Ejemplo n.º 4
0
 public static function registerModule()
 {
     Main::getDisplay()->addModuleNavigation(new Link(new Link\Route(__NAMESPACE__), new Link\Name('Fächer')));
     Main::getDispatcher()->registerRoute(Main::getDispatcher()->createRoute(__NAMESPACE__, __CLASS__ . '::frontendDashboard'));
     $tblSubjectAll = Subject::useService()->getSubjectAll();
     if ($tblSubjectAll) {
         /** @var TblSubject $tblSubject */
         foreach ((array) $tblSubjectAll as $Index => $tblSubject) {
             $tblSubjectAll[$tblSubject->getName()] = new Layout(new LayoutGroup(new LayoutRow(array(new LayoutColumn($tblSubject->getAcronym(), array(3, 3, 3, 3)), new LayoutColumn($tblSubject->getName() . new Muted(new Small('<br/>' . $tblSubject->getDescription())), array(9, 9, 9, 9))))));
             $tblSubjectAll[$Index] = false;
         }
         $tblSubjectAll = array_filter($tblSubjectAll);
         Main::getDispatcher()->registerWidget('Fächer', new Panel('Fächer verfügbar', $tblSubjectAll), 3, 8);
     }
     Main::getDispatcher()->registerWidget('Fächer', new Panel('Anzahl an Fächern', 'Insgesamt: ' . Subject::useService()->countSubjectAll()), 2, 1);
 }
Ejemplo n.º 5
0
 /**
  * @param string $Identifier
  *
  * @return bool|TblCategory
  */
 public function getTblCategoryByIdentifier($Identifier)
 {
     return Subject::useService()->getCategoryByIdentifier($Identifier);
 }
Ejemplo n.º 6
0
 /**
  * @param TblPerson|null $tblPerson
  * @param array          $Meta
  *
  * @return FormGroup
  */
 private function formGroupSubject(TblPerson $tblPerson = null, $Meta = array())
 {
     // Orientation
     $tblSubjectOrientation = Subject::useService()->getSubjectOrientationAll();
     if ($tblSubjectOrientation) {
         array_push($tblSubjectOrientation, new TblSubject());
     } else {
         $tblSubjectOrientation = array();
     }
     // Advanced
     $tblSubjectAdvanced = Subject::useService()->getSubjectAdvancedAll();
     if ($tblSubjectAdvanced) {
         array_push($tblSubjectAdvanced, new TblSubject());
     } else {
         $tblSubjectAdvanced = array();
     }
     // Elective
     $tblSubjectElective = Subject::useService()->getSubjectElectiveAll();
     if ($tblSubjectElective) {
         array_push($tblSubjectElective, new TblSubject());
     } else {
         $tblSubjectElective = array();
     }
     // Profile
     $tblSubjectProfile = Subject::useService()->getSubjectProfileAll();
     if ($tblSubjectProfile) {
         array_push($tblSubjectProfile, new TblSubject());
     } else {
         $tblSubjectProfile = array();
     }
     // Religion
     $tblSubjectReligion = Subject::useService()->getSubjectReligionAll();
     if ($tblSubjectReligion) {
         array_push($tblSubjectReligion, new TblSubject());
     } else {
         $tblSubjectReligion = array();
     }
     // ForeignLanguage
     $tblSubjectForeignLanguage = Subject::useService()->getSubjectForeignLanguageAll();
     if ($tblSubjectForeignLanguage) {
         array_push($tblSubjectForeignLanguage, new TblSubject());
     } else {
         $tblSubjectForeignLanguage = array();
     }
     $tblSubjectAll = Subject::useService()->getSubjectAll();
     array_push($tblSubjectAll, new TblSubject());
     return new FormGroup(array(new FormRow(array(new FormColumn(array(new Panel('Kurse / Profile / Religionsunterricht', array(new SelectBox('Meta[Subject][Orientation]', 'Neigungskurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectOrientation), new Education()) . new Panel('Historie', array('Klasse 8: Philosophie', 'Klasse 9: Mathematik')), new SelectBox('Meta[Subject][Advanced]', 'Vertiefungskurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAdvanced), new Education()) . new Panel('Historie', array('Klasse 10: Germanistik', 'Klasse 10: Mathematik')), new SelectBox('Meta[Subject][Profile]', 'Profil', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectProfile), new Education()), new SelectBox('Meta[Subject][Religion]', 'Religion', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectReligion), new Education())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Fremdsprachen', array(new SelectBox('Meta[Subject][ForeignLanguage][First]', '1. Fremdsprache', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectForeignLanguage), new Education()), new SelectBox('Meta[Subject][ForeignLanguage][Second]', '2. Fremdsprache', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectForeignLanguage), new Education()), new SelectBox('Meta[Subject][ForeignLanguage][Third]', '3. Fremdsprache', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectForeignLanguage), new Education()), new SelectBox('Meta[Subject][ForeignLanguage][Fourth]', '4. Fremdsprache', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectForeignLanguage), new Education())), Panel::PANEL_TYPE_INFO), new Panel('Wahlfächer', array(new SelectBox('Meta[Subject][Elective][First]', '1. Wahlfach', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectElective), new Education()), new SelectBox('Meta[Subject][Elective][Second]', '2. Wahlfach', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectElective), new Education())), Panel::PANEL_TYPE_INFO), new Panel('Arbeitsgemeinschaften', array(new SelectBox('Meta[Subject][Team][First]', '1. Arbeitsgemeinschaft', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Team][Second]', '2. Arbeitsgemeinschaft', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Team][Third]', '3. Arbeitsgemeinschaft', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education())), Panel::PANEL_TYPE_INFO)), 4), new FormColumn(array(new Panel('Leistungskurs / Grundkurs', array(new SelectBox('Meta[Subject][Track][Intensive][First]', new Education() . ' 1. Leistungskurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Intensive][Second]', new Education() . ' 2. Leistungskurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][0]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][1]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][2]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][3]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][4]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][5]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][6]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][7]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education()), new SelectBox('Meta[Subject][Track][Basic][8]', 'Grundkurs', array('{{ Acronym }} - {{ Name }} {{ Description }}' => $tblSubjectAll), new Education())), Panel::PANEL_TYPE_INFO)), 4)))), new Title('Unterrichtsfächer', new Warning(new Danger(new \SPHERE\Common\Frontend\Icon\Repository\Warning() . ' Es können im Moment nur fest vorgegebene Fächer in der aktuellen Demo-Version verwendet werden'))));
 }
Ejemplo n.º 7
0
 /**
  * @return bool|TblSubject[]
  */
 public function getTblSubjectAll()
 {
     return Subject::useService()->getSubjectAllByCategory($this);
 }