本文整理汇总了PHP中Mage_Adminhtml_Block_Abstract::_toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Abstract::_toHtml方法的具体用法?PHP Mage_Adminhtml_Block_Abstract::_toHtml怎么用?PHP Mage_Adminhtml_Block_Abstract::_toHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Block_Abstract
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Abstract::_toHtml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _toHtml
/**
* It was decided to use the overwritable _toHtml instead of a template
* to be consistent with magento renderers and to increase portability
*
* @return string
*/
protected function _toHtml()
{
$html = parent::_toHtml();
$html .= "<form id='{$this->getFormId()}' action='{$this->getFormAction()}' method='post' class='{$this->getFormClass()}' enctype='multipart/form-data'>";
$minigrid = new BlueAcorn_MiniGrid_Block_System_Config_Form_Field_Minigrid();
$html .= $minigrid->getElementHtml("ba-minigrid-form-grid", $this->getFieldName(), $this->getGridFields(), $this->getGridRowData());
$html .= "\n </form>\n <script type='text/javascript'>\n function submitMinigridForm() {\n \$('{$this->getFormId()}').submit();\n }\n </script>\n\n";
return $html;
}
示例2: _toHtml
/**
* Do a few checks to see if the template should be rendered before actually rendering it.
*
* @return string
*
* @see Mage_Adminhtml_Block_Abstract::_toHtml()
*/
protected function _toHtml()
{
$shipment = Mage::registry('current_shipment');
$helper = Mage::helper('tig_myparcel');
if (!$helper->isEnabled() || !$shipment || !$helper->shippingMethodIsMyParcel($shipment->getOrder()->getShippingMethod())) {
return '';
}
return parent::_toHtml();
}
示例3: _toHtml
/**
* Set data to block
*
* @return string
*/
protected function _toHtml()
{
$agreement = $this->_getBillingAgreement();
$this->setReferenceId($agreement->getReferenceId());
$customer = Mage::getModel('Mage_Customer_Model_Customer')->load($agreement->getCustomerId());
$this->setCustomerUrl($this->getUrl('*/customer/edit', array('id' => $customer->getId())));
$this->setCustomerEmail($customer->getEmail());
$this->setStatus($agreement->getStatusLabel());
$this->setCreatedAt($this->helper('Mage_Core_Helper_Data')->formatDate($agreement->getCreatedAt(), 'short', true));
$this->setUpdatedAt($agreement->getUpdatedAt() ? $this->helper('Mage_Core_Helper_Data')->formatDate($agreement->getUpdatedAt(), 'short', true) : $this->__('N/A'));
return parent::_toHtml();
}
示例4: _toHtml
/**
* Do a few checks to see if the template should be rendered before actually rendering it.
*
* @return string
*
* @see Mage_Adminhtml_Block_Abstract::_toHtml()
*/
protected function _toHtml()
{
$shippingMethod = $this->_order->getShippingMethod();
if (!$this->_helper->isEnabled() || !$this->_order || !$this->_helper->shippingMethodIsMyParcel($shippingMethod)) {
return '';
}
return parent::_toHtml();
}
示例5: _toHtml
/**
* _toHtml
*
* @return string
*/
public function _toHtml()
{
return parent::_toHtml();
}
示例6: _toHtml
/**
* Check if a payment method can be found before rendering the template.
*
* @return string
*/
protected function _toHtml()
{
if (!$this->getPaymentMethod()) {
return '';
}
return parent::_toHtml();
}