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


PHP Mage_Core_Controller_Varien_Action::_prepareDownloadResponse方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     //echo "mbnsdfjkn";
     $model = Mage::getModel('importexport/export');
     $model->setData(array('entity' => 'catalog_product', 'file_format' => 'csv', 'frontend_label' => '', 'attribute_code' => '', 'export_filter' => array('abc' => '', 'attr_config_sort' => '', 'color' => '', 'cost' => array('0' => '', '1' => ''), 'country_of_manufacture' => '', 'created_at' => array('0' => '', '1' => ''), 'custom_design' => '', 'custom_design_from' => array('0' => '', '1' => ''), 'custom_design_to' => array('0' => '', '1' => ''), 'custom_layout_update' => '', 'description' => '', 'enable_googlecheckout' => '', 'gallery' => '', 'gift_message_available' => '', 'has_options' => '', 'image' => '', 'image_label' => '', 'media_gallery' => '', 'meta_description' => '', 'meta_keyword' => '', 'meta_title' => '', 'minimal_price' => array('0' => '', '1' => ''), 'msrp' => array('0' => '', '1' => ''), 'msrp_display_actual_price_type' => '', 'msrp_enabled' => '', 'name' => '', 'news_from_date' => '', array('0' => '', '1' => ''), 'news_to_date' => '', array('0' => '', '1' => ''), 'options_container' => '', 'page_layout' => '', 'price' => array('0' => '', '1' => ''), 'required_options' => '', 'short_description' => '', 'sku' => '', 'small_image' => '', 'small_image_label' => '', 'special_from_date' => array('0' => '', '1' => ''), 'special_price' => array('0' => '', '1' => ''), 'special_to_date' => array('0' => '', '1' => ''), 'status' => '', 'tax_class_id' => '', 'thumbnail' => '', 'thumbnail_label' => '', 'updated_at' => array('0' => '', '1' => ''), 'url_key' => '', 'url_path' => '', 'visibility' => '', 'weight' => array('0' => '', '1' => ''))));
     //$obj = Mage_Adminhtml_Controller_Action();
     return Mage_Core_Controller_Varien_Action::_prepareDownloadResponse($model->getFileName(), $model->export(), $model->getContentType());
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:8,代码来源:IndexController.php

示例2: _prepareDownloadResponse

 /**
  * Declare headers and content file in response for file download
  *
  * @param string $fileName
  * @param string|array $content set to null to avoid starting output, $contentLength should be set explicitly in
  *                              that case
  * @param string $contentType
  * @param int $contentLength    explicit content length, if strlen($content) isn't applicable
  * @return Mage_Backend_Controller_ActionAbstract
  */
 protected function _prepareDownloadResponse($fileName, $content, $contentType = 'application/octet-stream', $contentLength = null)
 {
     $session = Mage::getSingleton('Mage_Backend_Model_Auth_Session');
     if ($session->isFirstPageAfterLogin()) {
         $this->_redirect(Mage::getSingleton('Mage_Backend_Model_Url')->getStartupPageUrl());
         return $this;
     }
     return parent::_prepareDownloadResponse($fileName, $content, $contentType, $contentLength);
 }
开发者ID:,项目名称:,代码行数:19,代码来源:


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