コード例 #1
0
 /**
  * Dateiliste initialisieren
  * @return array
  */
 protected function getFileList()
 {
     $data = array();
     foreach ($this->fileList->getDatabaseList() as $image) {
         $data[] = array('label' => $image->getFilename(), 'value' => $image->getImageUrl());
     }
     $res = $this->events->runEvent('editorGetFileList', array('label' => 'label', 'files' => $data));
     return isset($res['files']) && count($res['files']) ? $res['files'] : array();
 }
コード例 #2
0
ファイル: filelist.php プロジェクト: sea75300/fanpresscm3
 public function process()
 {
     if (!parent::process()) {
         return false;
     }
     $loadAjax = $this->fileList->getDatabaseFileCount() >= 1 ? true : false;
     $this->view->assign('loadAjax', $loadAjax);
     $this->view->addJsVars(array('fpcmBaseUrl' => \fpcm\classes\baseconfig::$rootPath, 'fpcmFmgrMode' => $this->mode, 'fpcmEditorType' => $this->config->system_editor, 'fpcmJqUploadInit' => $this->config->file_uploader_new));
     $this->view->addJsLangVars(array('newNameMsg' => $this->lang->translate('FILE_LIST_RENAME_NEWNAME')));
     $this->view->assign('newUploader', $this->config->file_uploader_new);
     $this->view->assign('jquploadPath', \fpcm\classes\loader::libGetFileUrl('jqupload'));
     $this->view->setViewJsFiles(array(\fpcm\classes\baseconfig::$jsPath . 'filemanager.js'));
     if ($this->config->file_uploader_new) {
         $this->view->assign('actionPath', \fpcm\classes\baseconfig::$rootPath . $this->getControllerLink('ajax/jqupload'));
     } else {
         $this->view->assign('actionPath', \fpcm\classes\baseconfig::$rootPath . $this->getControllerLink('files/list', array('mode' => $this->mode)));
         $translInfo = array('{{filecount}}' => ini_get("max_file_uploads"), '{{filesize}}' => \fpcm\classes\tools::calcSize(\fpcm\classes\baseconfig::uploadFilesizeLimit(true), 0));
         $this->view->assign('maxFilesInfo', $this->lang->translate('FILE_LIST_PHPMAXINFO', $translInfo));
     }
     $this->initViewAssigns(array(), array(), \fpcm\classes\tools::calcPagination(1, 1, 0, 0));
     $this->initPermissions();
     $this->view->render();
 }