Ejemplo n.º 1
0
 public function multiAction()
 {
     $this->getLayout()->setFile('modules/admin/layouts/iframe');
     $mediaMapper = new MediaMapper();
     $pagination = new \Ilch\Pagination();
     $pagination->setPage($this->getRequest()->getParam('page'));
     $lastId = $this->getRequest()->getParam('lastid');
     if ($this->getRequest()->getParam('type') === 'multi') {
         $type = $this->getConfig()->get('media_ext_img');
     }
     if ($this->getRequest()->getParam('type') === 'file') {
         $type = $this->getConfig()->get('media_ext_file');
     }
     if ($this->getRequest()->getParam('type') === 'video') {
         $type = $this->getConfig()->get('media_ext_video');
     }
     if (empty($lastId)) {
         $pagination->setRowsPerPage('40');
         $this->getView()->set('medias', $mediaMapper->getMediaListByEnding($type, $pagination));
     } else {
         $this->getView()->set('medias', $mediaMapper->getMediaListScroll($lastId));
     }
     $this->getView()->set('media_ext_img', $this->getConfig()->get('media_ext_img'));
     $this->getView()->set('media_ext_file', $this->getConfig()->get('media_ext_file'));
     $this->getView()->set('media_ext_video', $this->getConfig()->get('media_ext_video'));
 }