Esempio n. 1
0
 /**
  * getFileFieldValueById
  * @param string $strFileIds
  * @return object $objFiles
  * @author Cornelius Hansjakob <*****@*****.**>
  * @version 1.0
  */
 public function getFileFieldValueById($strFileIds)
 {
     try {
         if ($strFileIds != '') {
             $this->getModelFiles();
             $objFiles = $this->objModelFiles->loadFilesById($strFileIds);
             return $objFiles;
         } else {
             return '';
         }
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
     }
 }
 /**
  * getaddeditformAction
  * @author Thomas Schedler <*****@*****.**>   
  */
 public function getaddeditformAction()
 {
     $this->core->logger->debug('media->controllers->FileController->getaddeditformAction()');
     if ($this->getRequest()->isPost() && $this->getRequest()->isXmlHttpRequest()) {
         $this->getModelFiles();
         $objRequest = $this->getRequest();
         $strFileIds = $objRequest->getParam('fileIds');
         $objFiles = $this->objModelFiles->loadFilesById($strFileIds);
         $this->view->assign('strEditFormAction', '/zoolu/media/file/edit');
         $this->view->assign('strFileIds', $strFileIds);
         $this->view->assign('objFiles', $objFiles);
         $this->view->assign('languageOptions', HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->intLanguageId));
     }
     $this->assignSecurityOptions();
     $this->renderScript('file/addform.phtml');
 }
 /**
  * getfilesAction
  * @author Thomas Schedler <*****@*****.**>
  * @version 1.0
  */
 public function getfilesAction()
 {
     $this->core->logger->debug('global->controllers->ElementController->getfilesAction()');
     try {
         $strFileIds = $this->objRequest->getParam('fileIds');
         $strFieldName = $this->objRequest->getParam('fileFieldId');
         $strViewType = $this->objRequest->getParam('viewtype');
         /**
          * get files
          */
         $this->getModelFiles();
         $objFiles = $this->objModelFiles->loadFilesById($strFileIds);
         $this->view->assign('objFiles', $objFiles);
         $this->view->assign('fieldname', $strFieldName);
         $this->view->assign('viewtype', $strViewType);
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
         exit;
     }
 }
 /**
  * getfilesAction
  * @author Cornelius Hansjakob <*****@*****.**>
  * @version 1.0
  */
 public function getfilesAction()
 {
     $this->core->logger->debug('cms->controllers->PageController->getfilesAction()');
     try {
         $strFileIds = $this->objRequest->getParam('fileIds');
         $strFieldName = $this->objRequest->getParam('fileFieldId');
         $strViewType = $this->objRequest->getParam('viewtype');
         /**
          * get files
          */
         $this->getModelFiles();
         $this->objModelFiles->setAlternativLanguageId(Zend_Auth::getInstance()->getIdentity()->languageId);
         $objFiles = $this->objModelFiles->loadFilesById($strFileIds);
         $this->view->assign('objFiles', $objFiles);
         $this->view->assign('fieldname', $strFieldName);
         $this->view->assign('viewtype', $strViewType);
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
         exit;
     }
 }