Example #1
0
 function renderHtmlDelete()
 {
     $facilitet = new VIH_Model_Facilitet($this->name());
     if ($facilitet->delete()) {
         return new k_SeeOther($this->context->url('../'));
     }
     throw new Exception('Could not delete');
 }
Example #2
0
 function postForm()
 {
     if ($this->getForm()->validate()) {
         $facilitet = new VIH_Model_Facilitet($this->context->name());
         //$input = $this->form->exportValues();
         $input = $this->body();
         if ($id = $facilitet->save($input)) {
             return new k_SeeOther($this->context->url());
         }
     }
     return $this->render();
 }
Example #3
0
File: Index.php Project: vih/vih.dk
 function getContent()
 {
     $tpl = $this->template->create('Facilitet/oversigtsbillede');
     $data = array('faciliteter' => VIH_Model_Facilitet::getList('højskole'));
     return '<p>Klik dig rundt nedenunder for at tage en rundtur på Vejle Idrætshøjskole.</p>
     ' . $tpl->render($this, $data);
 }
Example #4
0
 function renderHtml()
 {
     $this->document->setTitle('Faciliteter');
     $this->document->addOption('Opret', $this->url('edit'));
     $data = array('faciliteter' => VIH_Model_Facilitet::getList('all'));
     $tpl = $this->template->create('faciliteter/faciliteter');
     return $tpl->render($this, $data);
 }
Example #5
0
File: Show.php Project: vih/vih.dk
 function getFaciliteterList()
 {
     $data = array('faciliteter' => VIH_Model_Facilitet::getList('højskole'));
     $tpl = $this->template->create('Facilitet/faciliteter');
     return $tpl->render($this, $data);
 }