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


PHP Mage_Adminhtml_Block_Widget_Form_Container::_prepareLayout方法代码示例

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


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

示例1: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $head = $this->getLayout()->getBlock('head');
     $sliders = Mage::registry('sliders');
     $slides = Mage::registry('slides');
     $backUrl = $this->getUrl('*/*/edit', array('id' => $sliders->getId(), 'activeTab' => 'slides_section'));
     $deleteUrl = $this->getUrl('*/*/deleteSlide', array('id' => $slides->getId(), 'sid' => $sliders->getId()));
     $this->updateButton('delete', 'onclick', "setLocation('{$deleteUrl}');");
     $this->updateButton('save', 'onclick', 'DnmSl.save();');
     $this->updateButton('back', 'onclick', 'setLocation(\'' . $backUrl . '\');');
     $this->_addButton('sac', array('label' => Mage::helper('dynamicslideshow')->__('Save and Continue Edit'), 'class' => 'save', 'onclick' => "DnmSl.save(true);"));
     if ($sliders->getId()) {
         if ($sliders->getData('load_googlefont') == 'yes') {
             $fonts = $sliders->getData('google_font');
             if (is_array($fonts)) {
                 foreach ($fonts as $font) {
                     $href = Mage::helper('dynamicslideshow')->getCssHref($font);
                     $head->addLinkRel('stylesheet', $href);
                 }
             }
         }
     }
     return $this;
 }
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:25,代码来源:Edit.php

示例2: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
         $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
     }
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:7,代码来源:Edit.php

示例3: _prepareLayout

 protected function _prepareLayout()
 {
     if ($this->_blockGroup && $this->_controller && $this->_mode) {
         $this->setChild('form', $this->getLayout()->createBlock('pws_faq/adminhtml_faq_articles_edit_form'));
     }
     return parent::_prepareLayout();
 }
开发者ID:abdev,项目名称:magento-FAQ,代码行数:7,代码来源:Edit.php

示例4: _prepareLayout

 /**
  * Prepare layout
  *
  * @return mixed
  */
 protected function _prepareLayout()
 {
     $this->setChild('form', $this->getLayout()->createBlock('magemonitoring/tab_form'));
     $tabList = $this->getLayout()->createBlock('magemonitoring/tab_list', 'magemonitoring_tabs');
     $this->getLayout()->getBlock('left')->append($tabList);
     return parent::_prepareLayout();
 }
开发者ID:unifiedarts,项目名称:Hackathon_MageMonitoring,代码行数:12,代码来源:Tab.php

示例5: _prepareLayout

 /**
  * @return Mage_Core_Block_Abstract
  */
 protected function _prepareLayout()
 {
     /* @var Open_Gallery_Model_Item $item */
     $item = Mage::registry('item');
     $this->_formScripts = $item->getHelper()->prepareEditFormScripts($item, $this->_formScripts);
     return parent::_prepareLayout();
 }
开发者ID:shakhawat4g,项目名称:Magento-Gallery-Extension,代码行数:10,代码来源:Edit.php

示例6: _prepareLayout

 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $head = $this->getLayout()->getBlock('head');
     $slider = Mage::registry('revslider');
     $slide = Mage::registry('revslide');
     $backUrl = $this->getUrl('*/*/edit', array('id' => $slider->getId(), 'activeTab' => 'slide_section'));
     $deleteUrl = $this->getUrl('*/*/deleteSlide', array('id' => $slide->getId(), 'sid' => $slider->getId()));
     $this->updateButton('delete', 'onclick', "setLocation('{$deleteUrl}');");
     $this->updateButton('save', 'onclick', 'revLayer.save();');
     $this->updateButton('back', 'onclick', 'setLocation(\'' . $backUrl . '\');');
     $this->_addButton('sac', array('label' => Mage::helper('revslider')->__('Save and Continue Edit'), 'class' => 'save', 'onclick' => "revLayer.save(true);"));
     if (version_compare(Mage::getVersion(), '1.7.0.0') < 0) {
         $head->addJs('am/extensions/prototype/dragdrop.js');
     }
     if ($slider->getId()) {
         if ($slider->getData('load_googlefont') == 'true') {
             $fonts = $slider->getData('google_font');
             if (is_array($fonts)) {
                 foreach ($fonts as $font) {
                     $href = Mage::helper('revslider')->getCssHref($font);
                     $head->addLinkRel('stylesheet', $href);
                 }
             }
         }
     }
     return $this;
 }
开发者ID:zaiats85,项目名称:blacknwhite,代码行数:28,代码来源:Edit.php

示例7: _prepareLayout

 protected function _prepareLayout()
 {
     if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true) && Mage::helper('googleoptimizer')->isOptimizerActive(Mage::app()->getStore()->getStoreId())) {
         $this->setChild('googleoptimizer_js', $this->getLayout()->createBlock('googleoptimizer/js')->setTemplate('googleoptimizer/js.phtml'));
     }
     return parent::_prepareLayout();
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:7,代码来源:Edit.php

示例8: _prepareLayout

 protected function _prepareLayout()
 {
     if (!Mage::registry('current_customer')->isReadonly()) {
         $this->_addButton('save_and_continue', array('label' => Mage::helper('customer')->__('Save and Continue Edit'), 'onclick' => 'saveAndContinueEdit(\'' . $this->_getSaveAndContinueUrl() . '\')', 'class' => 'save'), 10);
     }
     return parent::_prepareLayout();
 }
开发者ID:swsnow,项目名称:lexiconn_mailinglist,代码行数:7,代码来源:Edit.php

示例9: _prepareLayout

 protected function _prepareLayout()
 {
     if ($this->_blockGroup && $this->_controller && $this->_mode) {
         $this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_' . $this->_mode . '_form'));
     }
     return parent::_prepareLayout();
 }
开发者ID:rafaelferreiraxd,项目名称:modulos-magento,代码行数:7,代码来源:Edit.php

示例10: _prepareLayout

 /**
  * Set the custom form block
  *
  * @return $this
  */
 protected function _prepareLayout()
 {
     // Allows a custom child form block
     $this->_mode = false;
     $this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_form'));
     return parent::_prepareLayout();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:12,代码来源:Autologin.php

示例11: _prepareLayout

 /**
  * Prepare catalog event form or category selector
  *
  * @return Enterprise_CatalogEvent_Block_Adminhtml_Event_Edit
  */
 protected function _prepareLayout()
 {
     if (!$this->getEvent()->getId() && !$this->getEvent()->getCategoryId()) {
         $this->_removeButton('save');
         $this->_removeButton('reset');
     } else {
         $this->_addButton('save_and_continue', array('label' => $this->helper('enterprise_catalogevent')->__('Save and Continue Edit'), 'class' => 'save', 'onclick' => 'saveAndContinue()'), 1);
         $this->_formScripts[] = '
             function saveAndContinue() {
                 if (editForm.validator.validate()) {
                     $(editForm.formId).insert({bottom:
                         \'<\' + \'input type="hidden" name="_continue" value="1" /\' + \'>\'
                     });
                     editForm.submit();
                 }
             }
         ';
     }
     parent::_prepareLayout();
     if (!$this->getEvent()->getId() && !$this->getEvent()->getCategoryId()) {
         $this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_' . $this->_mode . '_category'));
     }
     if ($this->getRequest()->getParam('category')) {
         $this->_updateButton('back', 'label', $this->helper('enterprise_catalogevent')->__('Back to Category'));
     }
     if ($this->getEvent()->isReadonly() && $this->getEvent()->getImageReadonly()) {
         $this->_removeButton('save');
         $this->_removeButton('reset');
         $this->_removeButton('save_and_continue');
     }
     if (!$this->getEvent()->isDeleteable()) {
         $this->_removeButton('delete');
     }
     return $this;
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:40,代码来源:Edit.php

示例12: _prepareLayout

 protected function _prepareLayout()
 {
     if ($this->_getStatus()->status_key) {
         $this->_removeButton("delete");
     }
     parent::_prepareLayout();
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:7,代码来源:Edit.php

示例13: _prepareLayout

 protected function _prepareLayout()
 {
     //   return false;
     $this->_addButton('save_and_continue', array('label' => $this->__('Save And Continue Edit'), 'onclick' => 'editForm.submit(\'' . $this->_getSaveAndContinueUrl() . '\')', 'class' => 'save'), 10);
     $this->_addButton('parse', array('label' => $this->__('Parse'), 'onclick' => "setLocation('{$this->getUrl('*/*/parse', array('_current' => true))}')"), 10);
     return parent::_prepareLayout();
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:7,代码来源:Email.php

示例14: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     // add scripts
     $js = $this->getLayout()->createBlock('core/template', 'webforms_js', array('template' => 'webforms/js.phtml', 'tabs_block' => 'webforms_fields_tabs'));
     $this->getLayout()->getBlock('content')->append($js);
 }
开发者ID:xiaoguizhidao,项目名称:BumblebeeSite,代码行数:7,代码来源:Edit.php

示例15: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('form', $this->getLayout()->createBlock('cores/Adminhtml_Cadastro_Form'));
     Mage::app()->getLayout()->getBlock('head')->addJs('cores/spectrum.js');
     Mage::app()->getLayout()->getBlock('head')->addItem('skin_css', 'images/cores/spectrum.css');
     return parent::_prepareLayout();
 }
开发者ID:xiaoguizhidao,项目名称:emporiodopara,代码行数:7,代码来源:Cadastro.php


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