public function indexAction()
 {
     $lng = $this->_getParam('lng', 'nl');
     $proxy = new SxModule_Eyecatchers_Proxy();
     $items = $proxy->getAll($lng, true);
     $this->view->items = $items;
 }
Example #2
0
 public function getAll($lng = 'nl')
 {
     $proxy = new SxModule_Eyecatchers_Proxy();
     return $proxy->getAll($lng);
 }
 public function deleteAction()
 {
     SxCms_Acl::requireAcl('eyecatchers', 'eyecatchers.delete');
     $proxy = new SxModule_Eyecatchers_Proxy();
     $item = $proxy->getById((int) $this->_getParam('id'));
     $picture = $item->getPicture();
     $pic1 = "images/eyecatchers/253x115/" . $picture;
     $pic2 = "images/eyecatchers/980x450/" . $picture;
     if (file_exists($pic1)) {
         unlink($pic1);
     }
     if (file_exists($pic2)) {
         unlink($pic2);
     }
     $item->delete();
     $cache = Zend_Registry::get('cache');
     $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('SxModule_Eyecatchers'));
     $flashMessenger = $this->_helper->getHelper('FlashMessenger');
     $flashMessenger->addMessage($this->admin_tmx->_('itemdeleted'));
     $this->_helper->redirector->gotoSimple('index', 'eyecatchers');
 }