當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JCckDevHelper::getRelativePath方法代碼示例

本文整理匯總了PHP中JCckDevHelper::getRelativePath方法的典型用法代碼示例。如果您正苦於以下問題:PHP JCckDevHelper::getRelativePath方法的具體用法?PHP JCckDevHelper::getRelativePath怎麽用?PHP JCckDevHelper::getRelativePath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JCckDevHelper的用法示例。


在下文中一共展示了JCckDevHelper::getRelativePath方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: export_variation

 public function export_variation()
 {
     $app = JFactory::getApplication();
     $model = $this->getModel();
     $name = $app->input->getString('variation', '');
     $folder = $app->input->getString('folder', '');
     if ($file = $model->prepareExport_Variation($name, $folder)) {
         $file = JCckDevHelper::getRelativePath($file, false);
         $this->setRedirect(JUri::base() . 'index.php?option=com_cck&task=download&file=' . $file);
     } else {
         $this->setRedirect('index.php?option=com_cck&view=variations');
     }
 }
開發者ID:codigoaberto,項目名稱:SEBLOD,代碼行數:13,代碼來源:template.php

示例2: export

 public function export()
 {
     $app = JFactory::getApplication();
     $model = $this->getModel();
     $recordId = $app->input->getInt('id', 0);
     $elements = $app->input->getString('elements', '');
     $elements = array_flip(explode(',', $elements));
     $dependencies = array();
     $menu = $app->input->getInt('dep_menu', 0);
     $options = $app->input->get('options', array(), 'array');
     if ($app->input->getInt('dep_categories', 0)) {
         $dependencies['categories'] = 1;
     }
     if ($menu) {
         $dependencies['menu'] = $menu;
     }
     if ($file = $model->prepareExport($recordId, $elements, $dependencies, $options)) {
         $file = JCckDevHelper::getRelativePath($file, false);
         $this->setRedirect(JUri::base() . 'index.php?option=com_cck&task=download&file=' . $file);
     } else {
         $this->setRedirect(_C0_LINK, JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
     }
 }
開發者ID:hamby,項目名稱:SEBLOD,代碼行數:23,代碼來源:folder.php

示例3: process

 public function process()
 {
     // JSession::checkToken() or jexit( JText::_( 'JINVALID_TOKEN' ) );
     if (!is_file(JPATH_ADMINISTRATOR . '/components/com_cck_toolbox/models/cck_toolbox.php')) {
         $this->setRedirect($this->_getReturnPage(), JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
         return;
     }
     $app = JFactory::getApplication();
     $ids = $app->input->get('cid', array(), 'array');
     $task_id = $app->input->getInt('tid', 0);
     jimport('joomla.utilities.arrayhelper');
     JArrayHelper::toInteger($ids);
     require_once JPATH_ADMINISTRATOR . '/components/com_cck_toolbox/models/cck_toolbox.php';
     $model = JModelLegacy::getInstance('CCK_Toolbox', 'CCK_ToolboxModel');
     $params = JComponentHelper::getParams('com_cck_toolbox');
     $output = 1;
     // $params->get( 'output', 0 );
     if ($file = $model->prepareProcess($params, $task_id, $ids)) {
         if ($output > 0) {
             $this->setRedirect($this->_getReturnPage(), JText::_('COM_CCK_SUCCESSFULLY_PROCESSED'), 'message');
         } else {
             $file = JCckDevHelper::getRelativePath($file, false);
             $this->setRedirect(JUri::base() . 'index.php?option=com_cck&task=download&file=' . $file);
         }
     } else {
         $this->setRedirect($this->_getReturnPage(), JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
     }
 }
開發者ID:hamby,項目名稱:SEBLOD,代碼行數:28,代碼來源:list.php

示例4: export

 public function export()
 {
     $app = JFactory::getApplication();
     $type = $app->input->getString('extension', 'plugin');
     $model = $this->getModel();
     if ($type == 'languages') {
         $lang_tag = $app->input->getString('lang_tag', 'en-GB');
         if ($file = $model->prepareLanguages($lang_tag)) {
             $file = JCckDevHelper::getRelativePath($file, false);
             $this->setRedirect(JUri::base() . 'index.php?option=com_cck&task=download&file=' . $file);
         }
     } else {
         $id = $app->input->getInt('extension_id', 0);
         if ($file = $model->prepareExport($id)) {
             $file = JCckDevHelper::getRelativePath($file, false);
             $this->setRedirect(JUri::base() . 'index.php?option=com_cck&task=download&file=' . $file);
         } else {
             switch ($type) {
                 case 'plugin':
                 default:
                     $link = 'index.php?option=com_' . $type . 's&view=' . $type . '&layout=edit&extension_id=' . $id;
                     break;
             }
             $this->setRedirect($link, 'Plugin not found. Try to download it manually.', 'notice');
         }
     }
 }
開發者ID:olafzieger,項目名稱:joomla3.x-seblod-test,代碼行數:27,代碼來源:controller.php


注:本文中的JCckDevHelper::getRelativePath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。