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


PHP Mage_Core_Model_Layout::_generateBlock方法代码示例

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


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

示例1: _generateBlock

 /**
  * Add block object to layout based on xml node data
  *
  * @param Varien_Simplexml_Element $node
  * @param Varien_Simplexml_Element $parent
  *
  * @return Aoe_Layout_Model_Layout
  */
 protected function _generateBlock($node, $parent)
 {
     if ($node instanceof Mage_Core_Model_Layout_Element) {
         if (!$this->checkConditionals($node)) {
             return $this;
         }
     }
     return parent::_generateBlock($node, $parent);
 }
开发者ID:aoepeople,项目名称:aoe_layout,代码行数:17,代码来源:Layout.php

示例2: _generateBlock

 protected function _generateBlock($node, $parent)
 {
     if (isset($node['ifconfig']) && ($configPath = (string) $node['ifconfig'])) {
         if (!Mage::getStoreConfigFlag($configPath)) {
             return;
         }
     }
     return parent::_generateBlock($node, $parent);
 }
开发者ID:vesviet,项目名称:dellocal,代码行数:9,代码来源:Layout.php

示例3: _generateBlock

 /**
  * Add block object to layout based on xml node data
  *
  * @param Varien_Simplexml_Element $node
  * @param Varien_Simplexml_Element $parent
  * @return Mage_Core_Model_Layout
  */
 protected function _generateBlock($node, $parent)
 {
     $viewerEnabled = Mage::getStoreConfigFlag('dev/debug/widgetslotviewer_enable');
     if ($viewerEnabled && isset($node->label)) {
         $blockLabel = $node->label;
         $viewerName = $node['name'] . '.slot_viewer';
         $viewerXml = "<block type='core/template' name='{$viewerName}' template='widgetslotviewer/slotviewer.phtml'>" . "<action method='setParentLabel'><label>{$blockLabel}</label></action>" . "</block>";
         $viewerChild = new Varien_Simplexml_Element($viewerXml);
         $node->appendChild($viewerChild);
     }
     return parent::_generateBlock($node, $parent);
 }
开发者ID:eBayEnterprise,项目名称:magento-widget-slot-viewer,代码行数:19,代码来源:Layout.php

示例4: _generateBlock

 /**
  * Add block object to layout based on xml node data
  *
  * @param Varien_Simplexml_Element $node
  * @param Varien_Simplexml_Element $parent
  * @return Mage_Core_Model_Layout
  */
 protected function _generateBlock($node, $parent)
 {
     // Check for enterprise version to determine if we should render the targetrule blocks
     $ee = Mage::helper('mybuys')->isMageEnterprise();
     $myBuysBlockName = (string) $node['name'];
     // If CE, then do not add these blocks
     if (!$ee && ($myBuysBlockName == "mybuys_targetrule_related" || $myBuysBlockName == "mybuys_targetrule_upsell")) {
         return $this;
     } else {
         // For all others, call the parent
         parent::_generateBlock($node, $parent);
     }
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:20,代码来源:Layout.php

示例5: _generateBlock

 /**
  * Records information about new block creation
  * (non-PHPdoc)
  * @see Mage_Core_Model_Layout::_generateBlock()
  */
 protected function _generateBlock($node, $parent)
 {
     $this->_collectedBlock = null;
     parent::_generateBlock($node, $parent);
     if ($this->_collectedBlock !== null) {
         $target = $this->_collectedBlock->getNameInLayout();
         $params = array();
         if (isset($node['as'])) {
             $params['alias'] = (string) $node['as'];
         } else {
             $params['alias'] = $target;
         }
         if (isset($node['class'])) {
             $params['type'] = (string) $node['class'];
         } elseif (isset($node['type'])) {
             $params['type'] = (string) $node['type'];
         }
         $params['class'] = get_class($this->_collectedBlock);
         $params['is_root'] = isset($node['output']);
         $this->record(self::ACTION_BLOCK_CREATED, $target, $params);
         if (isset($node['template'])) {
             $this->record(self::ACTION_BLOCK_ACTION, $target . '::setTemplate', array('template' => (string) $node['template']));
         }
     }
     return $this;
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:31,代码来源:Layout.php

示例6: processingGenerateBlock

 private function processingGenerateBlock($node, $parent, $config_node)
 {
     $node['template'] = $config_node;
     return parent::_generateBlock($node, $parent);
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:5,代码来源:Layout.php

示例7: _generateBlock

 /**
  * Add block object to layout based on XML node data
  *
  * @param Varien_Simplexml_Element $node
  * @param Varien_Simplexml_Element $parent
  * @return Mage_Core_Model_Layout
  */
 protected function _generateBlock($node, $parent)
 {
     parent::_generateBlock($node, $parent);
     $blockName = (string) $node['name'];
     $block = $this->getBlock($blockName);
     if (!$block) {
         return $this;
     }
     if (in_array($blockName, array_keys($this->_cacheBlocks))) {
         $block->setData('cache_lifetime', $this->_cacheBlocks[$blockName]['lifetime']);
         if (!empty($this->_cacheBlocks[$blockName]['key'])) {
             $block->setData('cache_key', $this->_cacheBlocks[$blockName]['key']);
         }
     }
     if (in_array($blockName, array_keys($this->_esiBlocks))) {
         $block->setData('esi', 1);
     }
     return $this;
 }
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:26,代码来源:Layout.php


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