public function deleteAction() { $id = $this->_request->getParam('id'); $mdlShow = new Slideshow_Show(); $mdlShow->deleteShow($id); $this->_forward('index', 'index'); }
public function indexAction() { $showForm = new Show_Form(); $showForm->removeElement('description'); $showForm->setAction($this->baseUrl . '/mod_slideshow/show/create'); $submit = $showForm->getElement('submit'); $submit->setLabel($this->view->getTranslation('Create Slideshow')); $this->view->form = $showForm; $mdlSlideshow = new Slideshow_Show(); $this->view->slideshows = $mdlSlideshow->getShows(); }
/** * */ public function selectSlideshow($name, $value) { $mdlShow = new Slideshow_Show(); $shows = $mdlShow->getShows(); if ($shows == null) { return $this->view->getTranslation('There are no slideshows to view!'); } else { $options[] = $this->view->getTranslation('Select One'); foreach ($shows as $show) { $options[$show->id] = $show->name; } $form = new Digitalus_Form(); $select = $form->createElement('select', $name, array('multiOptions' => $options, 'belongsTo' => 'module')); return $select; } }
public function reorderAction() { $mdlShow = new Slideshow_Show(); $mdlSlide = new Slideshow_Slide(); if ($this->_request->isPost()) { //sort the slides $ids = Digitalus_Filter_Post::raw('id'); $mdlSlide->sortSlides($ids); $show = Digitalus_Filter_Post::get('show'); $url = '/mod_slideshow/show/edit/id/' . $show; $this->_redirect($url); } else { $show = $this->_request->getParam('show'); } $this->view->slides = $mdlSlide->getSlides($show); $this->view->show = $mdlShow->find($show)->current(); }