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


PHP Mage_Adminhtml_Block_Template::_prepareLayout方法代码示例

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


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

示例1: _prepareLayout

 protected function _prepareLayout()
 {
     $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'), 'class' => 'save', 'data_attribute' => array('mage-init' => array('button' => array('event' => 'save', 'target' => '#set-prop-form')))));
     $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back'));
     $this->addChild('setForm', 'Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset');
     return parent::_prepareLayout();
 }
开发者ID:natxetee,项目名称:magento2,代码行数:7,代码来源:Add.php

示例2: _prepareLayout

 protected function _prepareLayout()
 {
     $url = $this->getUrl('*/*/add', array('_current' => true, 'parent' => base64_encode($this->getCategoryPath()), 'id' => null));
     $this->setChild('add_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add New'), 'onclick' => "setLocation('" . $url . "')", 'class' => 'add')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/*', array('store' => null))));
     return parent::_prepareLayout();
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:7,代码来源:Tree.php

示例3: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('core')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back')));
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('core')->__('Save'), 'onclick' => 'designForm.submit()', 'class' => 'save')));
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('core')->__('Delete'), 'onclick' => 'confirmSetLocation(\'' . Mage::helper('core')->__('Are you sure?') . '\', \'' . $this->getDeleteUrl() . '\')', 'class' => 'delete')));
     return parent::_prepareLayout();
 }
开发者ID:commercekitchen,项目名称:dualeyewear-magento,代码行数:7,代码来源:Edit.php

示例4: _prepareLayout

 protected function _prepareLayout()
 {
     $onclick = "submitAndReloadArea(\$('inchoo_ticket_view_tabs_view_tab_content'), '" . $this->getSubmitUrl() . "')";
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Submit Message'), 'class' => 'save', 'onclick' => $onclick));
     $this->setChild('submit_button', $button);
     return parent::_prepareLayout();
 }
开发者ID:ivan-veres,项目名称:Inchoo-Tickets,代码行数:7,代码来源:Message.php

示例5: _prepareLayout

 protected function _prepareLayout()
 {
     $customer = Mage::registry('current_customer');
     $this->setChild('sales', $this->getLayout()->createBlock('adminhtml/customer_edit_tab_view_sales'));
     $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion')->setId('customerViewAccordion');
     //->setShowOnlyOne(0)
     /* @var $accordion Mage_Adminhtml_Block_Widget_Accordion */
     $accordion->addItem('lastOrders', array('title' => Mage::helper('customer')->__('Recent Orders'), 'ajax' => true, 'content_url' => $this->getUrl('*/*/lastOrders', array('_current' => true))));
     // add shopping cart block of each website
     foreach (Mage::registry('current_customer')->getSharedWebsiteIds() as $websiteId) {
         $website = Mage::app()->getWebsite($websiteId);
         // count cart items
         $cartItemsCount = Mage::getModel('sales/quote')->setWebsite($website)->loadByCustomer($customer)->getItemsCollection(false)->getSize();
         // prepare title for cart
         $title = Mage::helper('customer')->__('Shopping Cart - %d item(s)', $cartItemsCount);
         if (count($customer->getSharedWebsiteIds()) > 1) {
             $title = Mage::helper('customer')->__('Shopping Cart of %1$s - %2$d item(s)', $website->getName(), $cartItemsCount);
         }
         // add cart ajax accordion
         $accordion->addItem('shopingCart' . $websiteId, array('title' => $title, 'ajax' => true, 'content_url' => $this->getUrl('*/*/viewCart', array('_current' => true, 'website_id' => $websiteId))));
     }
     // count wishlist items
     $wishlistCount = Mage::getModel('wishlist/wishlist')->loadByCustomer($customer)->getProductCollection()->addStoreData()->getSize();
     // add wishlist ajax accordion
     $accordion->addItem('wishlist', array('title' => Mage::helper('customer')->__('Wishlist - %d item(s)', $wishlistCount), 'ajax' => true, 'content_url' => $this->getUrl('*/*/viewWishlist', array('_current' => true))));
     $this->setChild('accordion', $accordion);
     return parent::_prepareLayout();
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:28,代码来源:View.php

示例6: _prepareLayout

 /**
  * Prepare layout.
  * Add accordion items
  *
  * @return Enterprise_Reward_Block_Adminhtml_Customer_Edit_Tab_Reward
  */
 protected function _prepareLayout()
 {
     $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion');
     $accordion->addItem('storecredit_history', array('title' => Mage::helper('storecreditpro')->__('Credit History'), 'open' => false, 'class' => '', 'ajax' => true, 'content_url' => $this->getUrl('storecreditpro/adminhtml_customer/history', array('_current' => true))));
     $this->setChild('mw_storecredit_history', $accordion);
     return parent::_prepareLayout();
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:13,代码来源:Storecredit.php

示例7: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('save_button', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'), 'onclick' => 'if (addSet.submit()) disableElements(\'save\');', 'class' => 'save')));
     $this->setChild('back_button', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back')));
     $this->setChild('setForm', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset'));
     return parent::_prepareLayout();
 }
开发者ID:nemphys,项目名称:magento2,代码行数:7,代码来源:Add.php

示例8: _prepareLayout

 protected function _prepareLayout()
 {
     $refreshButton = $this->setChild('refresh_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $this->__('Refresh'), 'onclick' => "\$('aw_hdu_stats_form').submit()", 'class' => 'task')));
     $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $this->__('Reset'), 'onclick' => "\$('period_date_to').value='';\$('period_date_from').value='';\$('aw_hdu_stats_form').submit();", 'class' => 'task')));
     parent::_prepareLayout();
     return $this;
 }
开发者ID:praxigento,项目名称:mage_app_prxgt_store,代码行数:7,代码来源:Stats.php

示例9: _prepareLayout

 protected function _prepareLayout()
 {
     $addUrl = $this->getUrl("*/*/add", array('_current' => true, 'id' => null, '_query' => false));
     $this->setChild('add_sub_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('cms')->__('Add Page'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add', 'id' => 'add_subpage_button', 'style' => $this->canAddSubPage() ? '' : 'display: none;')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/switch', array('_current' => true, '_query' => false, 'store' => null)))->setTemplate('clevercms/page/store/switcher.phtml'));
     return parent::_prepareLayout();
 }
开发者ID:smart-devs,项目名称:magento-clever-cms,代码行数:7,代码来源:Tree.php

示例10: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('import_category_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Import Categories'), 'onclick' => "importCategories('" . $this->getUrl('*/*/importCategories') . "')", 'id' => 'add_subvesverticalmenu_button')));
     $this->setChild('delete_category_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Categories'), 'onclick' => "deleteCategories('" . $this->getUrl('*/*/deleteCategories') . "', false)", 'id' => 'add_subvesverticalmenu_button')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/*'))->setTemplate('ves_verticalmenu/store/switcher.phtml'));
     return parent::_prepareLayout();
 }
开发者ID:quanghuynt93,项目名称:VesSmartshop,代码行数:7,代码来源:Tree.php

示例11: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save Attribute Set'), 'onclick' => 'addSet.submit();', 'class' => 'save')));
     $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back')));
     $this->setChild('setForm', $this->getLayout()->createBlock('adminhtml/catalog_product_attribute_set_main_formset'));
     return parent::_prepareLayout();
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:7,代码来源:Add.php

示例12: _prepareLayout

 /**
  * Prepare layout
  *
  * Set child blocks.
  *
  * @return void
  */
 protected function _prepareLayout()
 {
     $this->setChild('cmsPages', $this->getLayout()->createBlock('forkel_grids/adminhtml_dashboard_cms_pages_grid'));
     $this->setChild('adminLogins', $this->getLayout()->createBlock('forkel_grids/adminhtml_dashboard_login_admin_grid'));
     $this->setChild('custom', $this->getLayout()->createBlock('forkel_grids/adminhtml_dashboard_custom_grid'));
     parent::_prepareLayout();
 }
开发者ID:tobias-forkel,项目名称:Forkel_Grids,代码行数:14,代码来源:Dashboard.php

示例13: _prepareLayout

 /**
  * Prepare layout.
  * Add accordion items
  *
  * @return Enterprise_Reward_Block_Adminhtml_Customer_Edit_Tab_Reward
  */
 protected function _prepareLayout()
 {
     $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion');
     $accordion->addItem('reward_points_history', array('title' => Mage::helper('enterprise_reward')->__('Reward Points History'), 'open' => false, 'class' => '', 'ajax' => true, 'content_url' => $this->getUrl('*/customer_reward/history', array('_current' => true))));
     $this->setChild('history_accordion', $accordion);
     return parent::_prepareLayout();
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:13,代码来源:Reward.php

示例14: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('backButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Back'), 'onclick' => 'window.location.href=\'' . $this->getUrl('*/*/') . '\'', 'class' => 'back')));
     $this->setChild('resetButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Reset'), 'onclick' => 'window.location.reload()')));
     $this->setChild('saveButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Save'), 'onclick' => 'reviewForm._submit();return false;', 'class' => 'save')));
     return parent::_prepareLayout();
 }
开发者ID:shashankkanungo,项目名称:magento,代码行数:7,代码来源:SM_Reviews_Block_Adminhtml_Reviews_Buttons.php

示例15: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/newsletter_problem_grid', 'newsletter.problem.grid'));
     $this->setChild('deleteButton', $this->getLayout()->createBlock('adminhtml/widget_button', 'del.button')->setData(array('label' => Mage::helper('newsletter')->__('Delete Selected Problems'), 'onclick' => 'problemController.deleteSelected();')));
     $this->setChild('unsubscribeButton', $this->getLayout()->createBlock('adminhtml/widget_button', 'unsubscribe.button')->setData(array('label' => Mage::helper('newsletter')->__('Unsubscribe Selected'), 'onclick' => 'problemController.unsubscribe();')));
     return parent::_prepareLayout();
 }
开发者ID:blazeriaz,项目名称:youguess,代码行数:7,代码来源:Problem.php


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