本文整理汇总了PHP中Mage_Adminhtml_Block_Widget::_prepareLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget::_prepareLayout方法的具体用法?PHP Mage_Adminhtml_Block_Widget::_prepareLayout怎么用?PHP Mage_Adminhtml_Block_Widget::_prepareLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Block_Widget
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Widget::_prepareLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('uploader', $this->getLayout()->createBlock('adminhtml/media_uploader'));
//set flash uploader
$this->getUploader()->getConfig()->setUrl(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload'))->setFileField('image')->setFilters(array('images' => array('label' => Mage::helper('adminhtml')->__('Images (.gif, .jpg, .png)'), 'files' => array('*.gif', '*.jpg', '*.jpeg', '*.png'))));
return parent::_prepareLayout();
}
示例2: _prepareLayout
protected function _prepareLayout()
{
if (!$this->getRequest()->getParam('popup')) {
$this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/', array('store' => $this->getRequest()->getParam('store', 0))) . '\')', 'class' => 'back')));
} else {
$this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Close Window'), 'onclick' => 'window.close()', 'class' => 'cancel')));
}
if (!$this->getProduct()->isReadonly()) {
$this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Reset'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/*', array('_current' => true)) . '\')')));
$this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save'), 'onclick' => 'productForm.submit()', 'class' => 'save')));
}
if (!$this->getRequest()->getParam('popup')) {
if (!$this->getProduct()->isReadonly()) {
$this->setChild('save_and_edit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save and Continue Edit'), 'onclick' => 'saveAndContinueEdit(\'' . $this->getSaveAndContinueUrl() . '\')', 'class' => 'save')));
}
if ($this->getProduct()->isDeleteable()) {
$confirmationMessage = Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('Are you sure?'));
$this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete'), 'onclick' => 'confirmSetLocation(\'' . $confirmationMessage . '\', \'' . $this->getDeleteUrl() . '\')', 'class' => 'delete')));
}
if ($this->getProduct()->isDuplicable()) {
$this->setChild('duplicate_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Duplicate'), 'onclick' => 'setLocation(\'' . $this->getDuplicateUrl() . '\')', 'class' => 'add')));
}
}
return parent::_prepareLayout();
}
示例3: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('uploader', $this->getLayout()->createBlock('adminhtml/media_uploader'));
$this->getUploader()->getConfig()->setUrl(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/catalog_product_gallery/upload'))->setFileField('image')->setFilters(array('images' => array('label' => Mage::helper('adminhtml')->__('Images (.gif, .jpg, .png)'), 'files' => array('*.gif', '*.jpg', '*.jpeg', '*.png'))));
Mage::dispatchEvent('catalog_product_gallery_prepare_layout', array('block' => $this));
return parent::_prepareLayout();
}
示例4: _prepareLayout
/**
* Preparing global layout
*
* You can redefine this method in child classes for changin layout
*
* @return Mage_Core_Block_Abstract
*/
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element'));
return parent::_prepareLayout();
}
示例5: _prepareLayout
/**
* Prepare global layout
* Add "Add tier" button to layout
*
* @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
*/
protected function _prepareLayout()
{
$button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Product SKU'), 'onclick' => 'return productSkuControl.addItem()', 'class' => 'add'));
$button->setName('add_product_sku_button');
$this->setChild('add_button', $button);
return parent::_prepareLayout();
}
示例6: _prepareLayout
protected function _prepareLayout()
{
$this->setChild("uploader", $this->getLayout()->createBlock("igallery/adminhtml_media_uploader"));
$this->getUploader()->getConfig()->setUrl(Mage::getModel("adminhtml/url")->addSessionParam()->getUrl("*/*/image"))->setFileField("image")->setFilters(array("images" => array("label" => Mage::helper("adminhtml")->__("Images (.gif, .jpg, .png)"), "files" => array("*.gif", "*.jpg", "*.jpeg", "*.png"))));
$this->setChild("delete_button", $this->getLayout()->createBlock("adminhtml/widget_button")->addData(array("id" => "{{id}}-delete", "class" => "delete", "type" => "button", "label" => Mage::helper("adminhtml")->__("Remove"), "onclick" => $this->getJsObjectName() . ".removeFile('{{fileId}}')")));
return parent::_prepareLayout();
}
示例7: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
//------------------------------
$helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_template_edit_general_help');
$this->setChild('help', $helpBlock);
//------------------------------
//------------------------------
$data = array('template_nick' => Ess_M2ePro_Model_Ebay_Template_Manager::TEMPLATE_PAYMENT);
$switcherBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_template_switcher');
$switcherBlock->setData($data);
$this->setChild('payment', $switcherBlock);
//------------------------------
//------------------------------
$data = array('template_nick' => Ess_M2ePro_Model_Ebay_Template_Manager::TEMPLATE_SHIPPING);
$switcherBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_template_switcher');
$switcherBlock->setData($data);
$this->setChild('shipping', $switcherBlock);
//------------------------------
//------------------------------
$data = array('template_nick' => Ess_M2ePro_Model_Ebay_Template_Manager::TEMPLATE_RETURN);
$switcherBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_template_switcher');
$switcherBlock->setData($data);
$this->setChild('return', $switcherBlock);
//------------------------------
return $this;
}
示例8: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('browse_button', $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('id' => $this->_getButtonId('browse'), 'label' => Mage::helper('adminhtml')->__('Browse Files...'), 'type' => 'button', 'onclick' => $this->getJsObjectName() . '.browse()')));
$this->setChild('upload_button', $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('id' => $this->_getButtonId('upload'), 'label' => Mage::helper('adminhtml')->__('Upload Files'), 'type' => 'button', 'onclick' => $this->getJsObjectName() . '.upload()')));
$this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('id' => '{{id}}-delete', 'class' => 'delete', 'type' => 'button', 'label' => Mage::helper('adminhtml')->__('Remove'), 'onclick' => $this->getJsObjectName() . '.removeFile(\'{{fileId}}\')')));
return parent::_prepareLayout();
}
示例9: _prepareLayout
/**
* Preparing layout, adding buttons
*
* @return Mage_Eav_Block_Adminhtml_Attribute_Edit_Options_Abstract
*/
protected function _prepareLayout()
{
$this->setChild('trainevent_form', $this->getLayout()->createBlock('wage_trainevent/adminhtml_trainevent_edit_tab_form'));
$this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('wage_trainevent')->__('Delete'), 'class' => 'delete delete-option')));
$this->setChild('add_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('wage_trainevent')->__('Add Schedules'), 'class' => 'add', 'id' => 'add_new_option_button')));
return parent::_prepareLayout();
}
示例10: _prepareLayout
protected function _prepareLayout()
{
$this->addChild('add_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New Option'), 'class' => 'add', 'id' => 'add_new_defined_option'));
$this->addChild('options_box', 'Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option');
$this->addChild('import_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Import Options'), 'class' => 'add', 'id' => 'import_new_defined_option'));
return parent::_prepareLayout();
}
示例11: _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();
}
示例12: _prepareLayout
public function _prepareLayout()
{
$button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Price'), 'onclick' => 'return customerPriceControl.showCustomerGrid();', 'class' => 'add'));
$button->setName('add_customer_price_item_button');
$this->setChild('add_button', $button);
return parent::_prepareLayout();
}
示例13: _prepareLayout
/**
* Preparing the layout
*
* @return Mage_Core_Block_Abstract
*/
protected function _prepareLayout()
{
$this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Back'), 'onclick' => "window.location.href = '" . $this->getUrl('*/*') . "'", 'class' => 'back')));
$this->setChild('select_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Continue To PDF Template Type'), 'onclick' => "getSelectedItem()", 'type' => 'button', 'class' => 'select')));
$this->setChild('form', $this->getLayout()->createBlock('pdfgenerator/adminhtml_template_pdf_edit_tabs'));
return parent::_prepareLayout();
}
示例14: _prepareLayout
/**
* Prepare layout
*/
protected function _prepareLayout()
{
$this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/', array('store' => $this->getRequest()->getParam('store', 0))) . '\')', 'class' => 'back')));
$this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Reset'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/*', array('_current' => true)) . '\')')));
if ($this->getStaging()->canMerge()) {
$this->setChild('merge_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Merge...'), 'onclick' => 'setLocation(\'' . $this->getMergeUrl() . '\')', 'class' => 'add')));
} elseif ($this->getStaging()->getId()) {
$this->setChild('merge_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Merge'), 'class' => 'disabled')));
}
if ($this->getStaging()->canSave()) {
$this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Save'), 'onclick' => $this->getEditFormJsObject() . '.submit()', 'class' => 'save')));
} else {
if ($this->getRequest()->getParam('type')) {
$this->setChild('create_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Create'), 'onclick' => $this->getEditFormJsObject() . '.runCreate()', 'class' => 'add')));
}
}
if ($this->getStaging()->canResetStatus()) {
$this->setChild('reset_status_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Reset Status'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/resetStatus', array('_current' => true)) . '\')', 'class' => 'reset')));
}
$stagingId = $this->getStagingId();
if ($stagingId && $this->getStaging()->isScheduled()) {
$this->setChild('unschedule_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('enterprise_staging')->__('Unschedule Merge'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/unschedule', array('id' => $stagingId)) . '\')', 'class' => 'reset')));
}
return parent::_prepareLayout();
}
示例15: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('uploader', $this->getLayout()->createBlock('adminhtml/media_uploader'));
$this->getUploader()->getConfig()->setUrl(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload'))->setFileField('image')->setFilters(array('images' => array('label' => Mage::helper('adminhtml')->__('Images (.gif, .jpg, .png)'), 'files' => array('*.gif', '*.jpg', '*.jpeg', '*.png'))));
$this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('id' => '{{id}}-delete', 'class' => 'delete', 'type' => 'button', 'label' => Mage::helper('adminhtml')->__('Remove'), 'onclick' => $this->getJsObjectName() . '.removeFile(\'{{fileId}}\')')));
return parent::_prepareLayout();
}