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


PHP Mage_Core_Block_Template类代码示例

本文整理汇总了PHP中Mage_Core_Block_Template的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Template类的具体用法?PHP Mage_Core_Block_Template怎么用?PHP Mage_Core_Block_Template使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: _createChildBlocksRecursively

 /**
  * @param Mage_Core_Block_Template $parent
  * @param $items
  */
 protected function _createChildBlocksRecursively($parent, $items)
 {
     foreach ($items as $key => $item) {
         $block = $this->getLayout()->createBlock('manapro_filtertree/item', $parent->getNameInLayout() . '_' . $key, array('item' => $item, 'filter' => $this, 'template' => 'manapro/filtertree/item.phtml', 'show_in_filter' => $this->getShowInFilter()));
         $parent->setChild($parent->getNameInLayout() . '_' . $key, $block);
         $this->_createChildBlocksRecursively($block, $item->getItems());
     }
 }
开发者ID:xiaoguizhidao,项目名称:cupboardglasspipes.ecomitize.com,代码行数:12,代码来源:Filter.php

示例2: manejandobloquesAction

 public function manejandobloquesAction()
 {
     $block_1 = new Mage_Core_Block_Text();
     $block_1->setText('Original Text');
     $block_2 = new Mage_Core_Block_Text();
     $block_2->setText('The second sentence.');
     $main_block = new Mage_Core_Block_Template();
     $main_block->setTemplate('nofrills/manejandobloques.phtml');
     $main_block->setChild('the_first', $block_1);
     $main_block->setChild('the_second', $block_2);
     $block_1->setText('Wait , I want this text instead .');
     echo $main_block->toHtml();
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:13,代码来源:IndexController.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('sales/order/details.phtml');
     $this->setOrder(Mage::getModel('sales/order')->load($this->getRequest()->getParam('order_id')));
     Mage::registry('action')->getLayout()->getBlock('root')->setHeaderTitle(Mage::helper('sales')->__('Order Details'));
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:7,代码来源:Details.php

示例4: _toHtml

 protected function _toHtml()
 {
     if (!(bool) Mage::getStoreConfig('specialproducts/general/active')) {
         return '';
     }
     return parent::_toHtml();
 }
开发者ID:SuperAssassinNinja,项目名称:romances,代码行数:7,代码来源:Specialproducts.php

示例5: _toHtml

 protected function _toHtml()
 {
     if ($this->_collection->getSize() > 0) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:7,代码来源:Recent.php

示例6: _toHtml

 protected function _toHtml()
 {
     if (is_link(dirname(Mage::getModuleDir('', 'PostcodeNl_Api'))) && !Mage::getStoreConfig('dev/template/allow_symlink')) {
         throw new Mage_Core_Exception('Postcode.nl API Development: Symlinks not enabled! (set at Admin->System->Configuration->Advanced->Developer->Template Settings)');
     }
     return parent::_toHtml();
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:7,代码来源:Jsinit.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('review/customer/list.phtml');
     $this->_collection = Mage::getModel('review/review')->getProductCollection();
     $this->_collection->addStoreFilter(Mage::app()->getStore()->getId())->addCustomerFilter(Mage::getSingleton('customer/session')->getCustomerId())->setDateOrder()->setPageSize(5)->load()->addReviewSummary();
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例8: _toHtml

 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!$this->getCanUseToken()) {
         return '';
     }
     return parent::_toHtml();
 }
开发者ID:MadMaxAi,项目名称:sage-pay-suite-ce,代码行数:12,代码来源:TokenList.php

示例9: _toHtml

 protected function _toHtml()
 {
     if (Mage::helper('sales/reorder')->isAllow() && Mage::getSingleton('customer/session')->isLoggedIn()) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:7,代码来源:Sidebar.php

示例10: _toHtml

 public function _toHtml()
 {
     if (!Mage::getSingleton('helpdesk/config')->getSatisfactionIsActive()) {
         return '';
     }
     return parent::_toHtml();
 }
开发者ID:cesarfelip3,项目名称:clevermage_new,代码行数:7,代码来源:Satisfaction.php

示例11: _construct

 protected function _construct()
 {
     $this->setTemplate('arioem/part/selector.phtml');
     // here we need to let Magento independent ARI API gateway know what's the current customer cost
     Mage::getSingleton('customer/session')->unsCustomerCostPercent()->setCustomerCostPercent(Mage::helper('arioem')->getCustomerCostPercent());
     return parent::_construct();
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:7,代码来源:Selector.php

示例12: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->getLayout()->createBlock('catalog/breadcrumbs');
     if ($headBlock = $this->getLayout()->getBlock('head')) {
         $category = $this->getCurrentCategory();
         if ($title = $category->getMetaTitle()) {
             $headBlock->setTitle($title);
         }
         if ($description = $category->getMetaDescription()) {
             $headBlock->setDescription($description);
         }
         if ($keywords = $category->getMetaKeywords()) {
             $headBlock->setKeywords($keywords);
         }
         if ($this->helper('catalog/category')->canUseCanonicalTag()) {
             $headBlock->addLinkRel('canonical', $category->getUrl());
         }
         /*
         want to show rss feed in the url
         */
         if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) {
             $title = $this->helper('rss')->__('%s RSS Feed', $this->getCurrentCategory()->getName());
             $headBlock->addItem('rss', $this->getRssLink(), 'title="' . $title . '"');
         }
     }
     return $this;
 }
开发者ID:cnglobal-sl,项目名称:caterez,代码行数:28,代码来源:View.php

示例13: _toHtml

 public function _toHtml()
 {
     if (!Mage::helper('checkout')->isMultishippingCheckoutAvailable()) {
         return '';
     }
     return parent::_toHtml();
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:7,代码来源:Link.php

示例14: _toHtml

 /**
  * Render GA tracking scripts
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!Mage::helper('enterprise_googleanalyticsuniversal')->isTagManagerAvailable()) {
         return '';
     }
     return parent::_toHtml();
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:12,代码来源:Json.php

示例15: _toHtml

 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     $this->setChild('xml', $this->getLayout()->createBlock('realtimedespatch/adminhtml_exports_view_accordion'));
     $this->getChild('xml')->setExport($this->getExport());
     $this->getChild('lines')->setExport($this->getExport())->setReferenceLabel($this->getReferenceLabel());
     return parent::_toHtml();
 }
开发者ID:pierre-pizzetta,项目名称:orderflow-magento-module,代码行数:10,代码来源:Plane.php


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