当前位置: 首页>>代码示例>>PHP>>正文


PHP Gems_Loader::getImportLoader方法代码示例

本文整理汇总了PHP中Gems_Loader::getImportLoader方法的典型用法代码示例。如果您正苦于以下问题:PHP Gems_Loader::getImportLoader方法的具体用法?PHP Gems_Loader::getImportLoader怎么用?PHP Gems_Loader::getImportLoader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gems_Loader的用法示例。


在下文中一共展示了Gems_Loader::getImportLoader方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: answerImportAction

 /**
  * Import answers to a survey
  */
 public function answerImportAction()
 {
     $controller = 'answers';
     $importLoader = $this->loader->getImportLoader();
     $params['defaultImportTranslator'] = $importLoader->getDefaultTranslator($controller);
     $params['formatBoxClass'] = 'browser table';
     $params['importer'] = $importLoader->getImporter($controller);
     $params['importLoader'] = $importLoader;
     $params['tempDirectory'] = $importLoader->getTempDirectory();
     $params['importTranslators'] = $importLoader->getTranslators($controller);
     $this->addSnippets('Survey_AnswerImportSnippet', $params);
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:15,代码来源:SurveyMaintenanceAction.php

示例2: loadFormData

 /**
  * Hook that loads the form data from $_POST or the model
  *
  * Or from whatever other source you specify here.
  */
 protected function loadFormData()
 {
     $model = $this->getModel();
     if ($this->request->isPost()) {
         $this->formData = $model->loadPostData($this->request->getPost() + $this->formData, true);
     } else {
         // Assume that if formData is set it is the correct formData
         if (!$this->formData) {
             $this->formData = $model->loadNew();
         }
     }
     if (!(isset($this->formData['import_id']) && $this->formData['import_id'])) {
         $this->formData['import_id'] = mt_rand(10000, 99999) . time();
     }
     $this->_session = new \Zend_Session_Namespace(__CLASS__ . '-' . $this->formData['import_id']);
     if (!(isset($this->_session->localfile) && $this->_session->localfile)) {
         $importLoader = $this->loader->getImportLoader();
         $this->_session->localfile = \MUtil_File::createTemporaryIn($importLoader->getTempDirectory(), $this->request->getControllerName() . '_');
     }
     // \MUtil_Echo::track($this->formData);
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:26,代码来源:ImportTrackSnippetAbstract.php

示例3: getImportTranslators

 /**
  * Get the possible translators for the import snippet.
  *
  * @return array of \MUtil_Model_ModelTranslatorInterface objects
  */
 public function getImportTranslators()
 {
     return $this->loader->getImportLoader()->getTranslators($this->getRequest()->getControllerName());
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:9,代码来源:ModelSnippetActionAbstract.php


注:本文中的Gems_Loader::getImportLoader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。