本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Grid::_prepareLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Grid::_prepareLayout方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Grid::_prepareLayout怎么用?PHP Mage_Adminhtml_Block_Widget_Grid::_prepareLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Block_Widget_Grid
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Widget_Grid::_prepareLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setUseConfirm(false)->setSwitchUrl($this->getUrl('*/*/*', array('store' => null)))->setTemplate('report/store/switcher.phtml'));
$this->setChild('refresh_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Refresh'), 'onclick' => $this->getRefreshButtonCallback(), 'class' => 'task')));
parent::_prepareLayout();
return $this;
}
示例2: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('export_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Export'), 'onclick' => $this->getJsObjectName() . '.doExport()', 'class' => 'task')));
$this->setChild('reset_filter_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Reset Filter'), 'onclick' => $this->getJsObjectName() . '.resetFilter()')));
$this->setChild('search_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Search'), 'onclick' => $this->getJsObjectName() . '.doFilter()', 'class' => 'task')));
return parent::_prepareLayout();
}
示例3: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
$this->setExportVisibility('true');
$this->setChild('import_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('amfeed')->__('Add by Template'), 'onclick' => 'amFeedImportObject.load($(\'am_templates_select\').value);', 'class' => 'task')));
return $this;
}
示例4: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
$this->unsetChild('search_button');
$this->unsetChild('reset_filter_button');
return $this;
}
示例5: _prepareLayout
protected function _prepareLayout()
{
$slider = $this->_getSlider();
if ($slider && $slider->getId()) {
$url = $this->getUrl('*/*/addSlide', array('sid' => $slider->getId()));
$this->setChild('addSlideButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('revslider')->__('Add Slide'), 'onclick' => "setLocation('{$url}')", 'class' => 'scale add')));
}
return parent::_prepareLayout();
}
示例6: _prepareLayout
protected function _prepareLayout()
{
if ($this->getRequest()->getParam('archive')) {
$this->setChild('archive_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $this->__('Hide Archived'), 'onclick' => "{$this->getJsObjectName()}.addVarToUrl('archive', 0); {$this->getJsObjectName()}.reload();", 'class' => 'task')));
} else {
$this->setChild('archive_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $this->__('Show Archived'), 'onclick' => "{$this->getJsObjectName()}.addVarToUrl('archive', 1); {$this->getJsObjectName()}.reload();", 'class' => 'task')));
}
return parent::_prepareLayout();
}
示例7: _prepareLayout
protected function _prepareLayout()
{
$productType = Mage::registry('product')->getTypeId();
$name = sprintf('ZetaPrints %s products creation', $productType);
$profileId = $this->_getProfileId($name);
if ($profileId) {
$this->_addSourceButton($profileId);
}
return parent::_prepareLayout();
}
示例8: _prepareLayout
protected function _prepareLayout()
{
$result = parent::_prepareLayout();
$this->unsetChild('reset_filter_button');
$this->unsetChild('search_button');
$this->unsetChild('export_button');
$this->_pagerVisibility = false;
$this->_filterVisibility = false;
return $result;
}
示例9: _prepareLayout
protected function _prepareLayout()
{
$totalProductRecieved = Mage::helper('inventorypurchasing/purchaseorder')->getDataByPurchaseOrderId($this->getRequest()->getParam('id'), 'total_products_recieved');
$purchaseOrderId = $this->getRequest()->getParam('id');
$purchaseOrder = Mage::getModel('inventorypurchasing/purchaseorder')->load($purchaseOrderId);
if ($totalProductRecieved > 0 && $this->checkCreateReturn()) {
$this->setChild('return_order_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('inventorypurchasing')->__('Return Order'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/newreturnorder', array('purchaseorder_id' => $this->getRequest()->getParam('id'), 'warehouse_ids' => $purchaseOrder->getWarehouseId(), 'action' => 'newreturnorder', '_current' => false)) . '\')', 'class' => 'add', 'style' => 'float:right')));
}
if ($totalProductRecieved > 0 && $this->checkCreateReturnAll()) {
$this->setChild('return_all_order_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('inventorypurchasing')->__('Return All Orders'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/returnallorder', array('purchaseorder_id' => $this->getRequest()->getParam('id'), 'warehouse_ids' => $purchaseOrder->getWarehouseId(), 'action' => 'newreturnorder', '_current' => false)) . '\')', 'class' => 'add', 'style' => 'float:right')));
}
return parent::_prepareLayout();
}
示例10: _prepareLayout
protected function _prepareLayout()
{
$result = parent::_prepareLayout();
$this->unsetChild('reset_filter_button');
$this->unsetChild('search_button');
$this->unsetChild('export_button');
$this->_pagerVisibility = false;
$this->_filterVisibility = false;
// $this->setGridHeader('WordPress Integration Results');
return $result;
}
示例11: _prepareLayout
protected function _prepareLayout()
{
//$this->unsetChild('reset_filter_button');
//$this->unsetChild('search_button');
$thisId = $this->getRequest()->getParam('id');
$this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Add Customers'), 'onclick' => 'massAdd();', 'class' => 'add')));
/*
$this->setChild('email_button',
$this->getLayout()->createBlock('adminhtml/widget_button')
->setData(array(
'label' => Mage::helper('adminhtml')->__('Send Mail to Customers'),
//'onclick' => "setLocation('".$this->getUrl('common/index/sendmail/id/'.$thisId, array('_current'=>true))."')",
'onclick' => "setLocation('".$this->getUrl('aitindividpromo/index/sendmail/id/'.$thisId, array('_current'=>true))."')",
'class' => 'save',
))
);
*/
return parent::_prepareLayout();
}
示例12: _prepareLayout
protected function _prepareLayout()
{
if ($purchaseOrderId = $this->getRequest()->getParam('id')) {
$purchaseOrder = Mage::getModel('inventorypurchasing/purchaseorder')->load($purchaseOrderId);
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$sql = 'SELECT purchase_order_product_id from ' . $resource->getTableName("erp_inventory_purchase_order_product") . ' WHERE (purchase_order_id = ' . $this->getRequest()->getParam("id") . ') AND (qty_recieved < qty)';
$results = $readConnection->fetchAll($sql);
if ($purchaseOrder->getStatus() == '6' || !$results || count($results) < 1) {
return parent::_prepareLayout();
}
if ($this->checkCreateAllDelivery() && $purchaseOrder->getStatus() != 7) {
$this->setChild('create_all_delivery_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('inventorypurchasing')->__('Create all deliveries'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/alldelivery', array('purchaseorder_id' => $this->getRequest()->getParam('id'), 'action' => 'alldelivery', '_current' => false)) . '\')', 'class' => 'add', 'style' => 'float:right')));
}
if ($this->checkCreateNewDelivery() && $purchaseOrder->getStatus() != 7) {
$this->setChild('create_delivery_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('inventorypurchasing')->__('Create a new delivery'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/newdelivery', array('purchaseorder_id' => $this->getRequest()->getParam('id'), 'warehouse_ids' => $purchaseOrder->getWarehouseId(), 'action' => 'newdelivery', '_current' => false)) . '\')', 'class' => 'add', 'style' => 'float:right')));
}
}
return parent::_prepareLayout();
}
示例13: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
}
示例14: _prepareLayout
protected function _prepareLayout()
{
//------------------------------
$data = array('id' => 'save_filter_btn', 'label' => Mage::helper('M2ePro')->__('Save Filter'), 'class' => 'success', 'onclick' => 'EbayMotorAddItemGridHandlerObj.saveFilter()');
$saveFilterBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
$this->setChild('save_filter', $saveFilterBtn);
//------------------------------
//------------------------------
$data = array('id' => 'add_custom_motors_record_button', 'label' => Mage::helper('M2ePro')->__('Add New ' . $this->getItemTitle()), 'class' => 'success', 'style' => 'display: none;', 'onclick' => 'EbayMotorsHandlerObj.openAddRecordPopup()');
$addCustomMotorsRecordBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
$this->setChild('add_custom_motors_record_button', $addCustomMotorsRecordBtn);
//------------------------------
return parent::_prepareLayout();
}
示例15: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('clear_selections_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Clear Selections'), 'onclick' => 'clearGridSelections(\'review_id\')')));
return parent::_prepareLayout();
}