예제 #1
0
 public function getContent()
 {
     $groupNumber = Data::get("group");
     $groupLetter = Data::get("letter");
     $this->tpl->groups = Group::getList($groupNumber, $groupLetter);
     $this->tpl->schedule = Schedule::getData($groupNumber);
     return $this->fetch($this->name . DS . "content.tpl");
 }
예제 #2
0
 function _register_fields_dynamic()
 {
     $options = $this->getOptions();
     $this->schedule_form = new ScheduleItem_Form($options['schedule_id']);
     $schedule = new Schedule($this->udm->dbcon, $options['schedule_id']);
     $fields = array('Schedule' => array('type' => 'header', 'label' => $schedule->getData('name') . ' Schedule Information', 'public' => true, 'enabled' => true));
     $fields = array_merge($fields, $this->schedule_form->getFields());
     unset($fields['owner_id']);
     unset($fields['schedule_id']);
     foreach ($fields as $fname => $fDef) {
         $this->fields[$fname] = $fDef + array('enabled' => true, 'value' => isset($fDef['default']) ? $fDef['default'] : null);
         if (!isset($this->fields[$fname]['public'])) {
             $this->fields[$fname]['public'] = true;
         }
     }
     $this->insertAfterFieldOrder(array_keys($this->fields));
 }