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


PHP Mage_Core_Block_Abstract::_prepareLayout方法代码示例

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


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

示例1: _prepareLayout

 /**
  * Add RP link to tab if we have all rates
  *
  * @return Enterprise_Reward_Block_Customer_Account
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation');
     if ($navigationBlock && Mage::helper('enterprise_reward')->isEnabledOnFront()) {
         $navigationBlock->addLink('enterprise_reward', 'enterprise_reward/customer/info/', Mage::helper('enterprise_reward')->__('Reward Points'));
     }
     return $this;
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:14,代码来源:Account.php

示例2: _prepareLayout

 protected function _prepareLayout()
 {
     $head = $this->getLayout()->getBlock('head');
     $head->addItem('js_css', 'sm/dynamicslideshow/rs-plugin/css/settings.css');
     $head->addLinkRel('stylesheet', $this->getUrl('dynamicslideshow/index/getCssCaptions'));
     if (Mage::app()->getRequest()->getActionName() == 'preview') {
         $head->addJs('sm/dynamicslideshow/js/jquery-1.11.1.min.js');
         $head->addJs('sm/dynamicslideshow/js/jquery-noconflict.js');
     }
     return parent::_prepareLayout();
 }
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:11,代码来源:Preview.php

示例3: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $parentBlock = $this->getParentBlock();
     if (!$parentBlock) {
         #Mage::Log("block is empty!");
         return;
     }
     $parentBlock->addLink($this->_('Approve Orders'), 'corporate/quote/approve', $this->_('Approve Orders'), true, array(), 50, null);
     //public function addLink($label, $url='', $title='', $prepare=false, $urlParams=array(),
     //$position=null, $liParams=null, $aParams=null, $beforeText='', $afterText='')
     // see Mage_Page_Block_Template_Links::addLink()
     return $this;
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:14,代码来源:Link.php

示例4: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Option'), 'class' => 'delete delete-product-option ')));
     $path = 'global/catalog/product/options/custom/groups';
     foreach (Mage::getConfig()->getNode($path)->children() as $group) {
         $this->setChild($group->getName() . '_option_type', $this->getLayout()->createBlock((string) Mage::getConfig()->getNode($path . '/' . $group->getName() . '/render')));
         //            echo (string) Mage::getConfig()->getNode($path . '/' . $group->getName() . '/render').'<br>';
         //            echo (string) $group->getName() . '_option_type'.'<br>';
     }
     $scene7groups = Achang_Scene7_Model_System_Config_Source_Product_Options_Type::getScene7OptionGroups();
     foreach ($scene7groups as $k => $v) {
         $this->setChild($k . '_option_type', $this->getLayout()->createBlock($v['render']));
     }
     return Mage_Core_Block_Abstract::_prepareLayout();
 }
开发者ID:brobie,项目名称:magento_scene7,代码行数:15,代码来源:Option.php

示例5: _prepareLayout

 protected function _prepareLayout()
 {
     $product = Mage::registry('product');
     if (!($setId = $product->getAttributeSetId())) {
         $setId = $this->getRequest()->getParam('set', null);
     }
     if ($setId) {
         /* @var $block Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs */
         $block = $this->getLayout()->getBlock('product_tabs');
         if (!$block) {
             // This case occurs for example during the first step of configurable product creation
             return parent::_prepareLayout();
         }
         $data = array('tabs' => $block, 'request' => $this->getRequest());
         Mage::dispatchEvent('ayaline_core_adminhtml_catalog_product_tabs_initializer', $data);
     }
     return parent::_prepareLayout();
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:18,代码来源:TabsInitializer.php

示例6: _prepareLayout

 /**
  * Prepare global layout
  *
  * @return Mage_Cms_Block_Page
  */
 protected function _prepareLayout()
 {
     $page = $this->getPage();
     // show breadcrumbs
     if (Mage::getStoreConfig('web/default/show_cms_breadcrumbs') && ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) && $page->getIdentifier() !== Mage::getStoreConfig('web/default/cms_home_page') && $page->getIdentifier() !== Mage::getStoreConfig('web/default/cms_no_route')) {
         $breadcrumbs->addCrumb('home', array('label' => Mage::helper('cms')->__('Home'), 'title' => Mage::helper('cms')->__('Go to Home Page'), 'link' => Mage::getBaseUrl()));
         $breadcrumbs->addCrumb('cms_page', array('label' => $page->getTitle(), 'title' => $page->getTitle()));
     }
     $root = $this->getLayout()->getBlock('root');
     if ($root) {
         $root->addBodyClass('cms-' . $page->getIdentifier());
     }
     $head = $this->getLayout()->getBlock('head');
     if ($head) {
         $head->setTitle($page->getTitle());
         $head->setKeywords($page->getMetaKeywords());
         $head->setDescription($page->getMetaDescription());
     }
     return parent::_prepareLayout();
 }
开发者ID:par-orillonsoft,项目名称:Magento,代码行数:25,代码来源:Page.php

示例7: _prepareLayout

 /**
  * Prepare Global Layout
  *
  * @return Enterprise_Cms_Block_Hieararchy_Head
  */
 protected function _prepareLayout()
 {
     /* @var $node Enterprise_Cms_Model_Hierarchy_Node */
     $node = Mage::registry('current_cms_hierarchy_node');
     /* @var $head Mage_Page_Block_Html_Head */
     $head = $this->getLayout()->getBlock('head');
     if (Mage::helper('enterprise_cms/hierarchy')->isMetadataEnabled() && $node && $head) {
         $treeMetaData = $node->getTreeMetaData();
         if (is_array($treeMetaData)) {
             /* @var $linkNode Enterprise_Cms_Model_Hierarchy_Node */
             if ($treeMetaData['meta_cs_enabled']) {
                 $linkNode = $node->getMetaNodeByType(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_CHAPTER);
                 if ($linkNode->getId()) {
                     $head->addLinkRel(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_CHAPTER, $linkNode->getUrl());
                 }
                 $linkNode = $node->getMetaNodeByType(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_SECTION);
                 if ($linkNode->getId()) {
                     $head->addLinkRel(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_SECTION, $linkNode->getUrl());
                 }
             }
             if ($treeMetaData['meta_next_previous']) {
                 $linkNode = $node->getMetaNodeByType(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_NEXT);
                 if ($linkNode->getId()) {
                     $head->addLinkRel(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_NEXT, $linkNode->getUrl());
                 }
                 $linkNode = $node->getMetaNodeByType(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_PREVIOUS);
                 if ($linkNode->getId()) {
                     $head->addLinkRel(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_PREVIOUS, $linkNode->getUrl());
                 }
             }
             if ($treeMetaData['meta_first_last']) {
                 $linkNode = $node->getMetaNodeByType(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_FIRST);
                 if ($linkNode->getId()) {
                     $head->addLinkRel(Enterprise_Cms_Model_Hierarchy_Node::META_NODE_TYPE_FIRST, $linkNode->getUrl());
                 }
             }
         }
     }
     return parent::_prepareLayout();
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:45,代码来源:Head.php

示例8: _prepareLayout

 protected function _prepareLayout()
 {
     if (!Mage::helper('firecheckout')->canUseCaptchaModule()) {
         return parent::_prepareLayout();
     }
     /**
      * @var Mage_Core_Model_Layout
      */
     $layout = $this->getLayout();
     $login = $layout->getBlock('customer.login');
     if ($login) {
         $list = $layout->createBlock('core/text_list', 'form.additional.info');
         $captcha = $layout->createBlock('captcha/captcha', 'captcha.login.checkout');
         $captcha->setFormId('user_login')->setImgWidth(230)->setImgHeight(50);
         $list->append($captcha);
         $login->append($list);
     }
     $forgot = $layout->getBlock('customer.forgot');
     if ($forgot) {
         $list = $layout->createBlock('core/text_list', 'form.additional.info');
         $captcha = $layout->createBlock('captcha/captcha', 'captcha.forgot.checkout');
         $captcha->setFormId('user_forgotpassword')->setImgWidth(230)->setImgHeight(50);
         $list->append($captcha);
         $forgot->append($list);
     }
     $billing = $layout->getBlock('checkout.onepage.billing');
     if ($billing) {
         $list = $layout->createBlock('core/text_list', 'form.additional.info');
         $captcha = $layout->createBlock('captcha/captcha', 'captcha.guest.checkout');
         $captcha->setFormId('guest_checkout')->setImgWidth(230)->setImgHeight(50);
         $list->append($captcha);
         $captcha = $layout->createBlock('captcha/captcha', 'captcha.register.during.checkout');
         $captcha->setFormId('register_during_checkout')->setImgWidth(230)->setImgHeight(50);
         $list->append($captcha);
         $billing->append($list);
     }
     return parent::_prepareLayout();
 }
开发者ID:jokusafet,项目名称:MagentoSource,代码行数:38,代码来源:Captcha.php

示例9: _prepareLayout

	protected function _prepareLayout() {

		/*
		 * Doesn't work on inline widgets because layout isn't loaded until
		 * after the head has been written to the page. Fix.
		 *
		if($this->getLayout()->getBlock('janrain_engage_styles')==false) {
			$block = $this->getLayout()
				->createBlock('core/template', 'janrain_engage_styles')
				->setTemplate('janrain/engage/styles.phtml');
			$this->getLayout()->getBlock('head')->insert($block);
		}
		*/

		if($this->getLayout()->getBlock('janrain_engage_scripts')==false) {
			$block = $this->getLayout()
				->createBlock('core/template', 'janrain_engage_scripts')
				->setTemplate('janrain/engage/scripts.phtml');
			$this->getLayout()->getBlock('before_body_end')->insert($block);
		}

		parent::_prepareLayout();
	}
开发者ID:riteshsahu1981,项目名称:captainkyso,代码行数:23,代码来源:Share.php

示例10: _prepareLayout

 protected function _prepareLayout()
 {
     // Notifies Magento Booster that the Layered Navigation is loaded
     Mage::register('adjustware_layered_navigation_view', true, true);
     //remove Enterprise_PageCache data
     Mage::app()->getCache()->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array(Enterprise_PageCache_Model_Processor::CACHE_TAG));
     // get current category ID
     $category = Mage::registry('current_category');
     if ($category) {
         $iCurrentCatId = $category->getId();
     } else {
         $iCurrentCatId = null;
     }
     // get last cat ID
     $sessionObject = Mage::getSingleton('catalog/session');
     $request = Mage::app()->getRequest();
     if ($sessionObject && ($iLastCatId = $sessionObject->getAdjnavLastCategoryId())) {
         if ($iCurrentCatId != $iLastCatId && !$request->isXmlHttpRequest()) {
             Mage::register('adjnav_new_category', true);
         }
     }
     $sessionObject->setAdjnavLastCategoryId($iCurrentCatId);
     //preload setting
     $this->setIsRemoveLinks(Mage::getStoreConfig('design/adjnav/remove_links'));
     //blocks
     $this->createCategoriesBlock();
     $filterableAttributes = $this->_getFilterableAttributes();
     // we rewrite this piece of code
     // to make sure price filter is applied last
     $blocks = array();
     foreach ($filterableAttributes as $attribute) {
         #print_r($attribute);
         $blockType = 'adjnav/catalog_layer_filter_attribute';
         if ($attribute->getFrontendInput() == 'price') {
             $blockType = 'adjnav/catalog_layer_filter_price';
         }
         $name = $attribute->getAttributeCode() . '_filter';
         $blocks[$name] = $this->getLayout()->createBlock($blockType)->setLayer($this->getLayer())->setAttributeModel($attribute);
         $this->setChild($name, $blocks[$name]);
     }
     foreach ($blocks as $name => $block) {
         #echo "<br>" . $name . "<br>";
         $block->init();
         if (Mage::helper('adjnav')->isSolrEnabled()) {
             $block->addFacetCondition();
         }
     }
     $this->getLayer()->apply();
     return Mage_Core_Block_Abstract::_prepareLayout();
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:50,代码来源:View.php

示例11: _prepareLayout

 protected function _prepareLayout()
 {
     return Mage_Core_Block_Abstract::_prepareLayout();
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:4,代码来源:Categories.php


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