本文整理汇总了PHP中Mage_Adminhtml_Block_Template类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Template类的具体用法?PHP Mage_Adminhtml_Block_Template怎么用?PHP Mage_Adminhtml_Block_Template使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Adminhtml_Block_Template类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _toHtml
protected function _toHtml()
{
$period = 30;
$crawled = Mage::getResourceModel('amfpccrawler/log')->getCrawledPages($period);
$this->setCrawled($crawled);
return parent::_toHtml();
}
示例2: _prepareLayout
protected function _prepareLayout()
{
$this->setTemplate('system/design/index.phtml');
$this->setChild('add_new_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Design Change'), 'onclick' => "setLocation('" . $this->getUrl('*/*/new') . "')", 'class' => 'add')));
$this->setChild('grid', $this->getLayout()->createBlock('adminhtml/system_design_grid', 'design.grid'));
return parent::_prepareLayout();
}
示例3: _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();
}
示例4: _beforeToHtml
protected function _beforeToHtml()
{
parent::_beforeToHtml();
$data = array('class' => 'save-btn', 'label' => Mage::helper('M2ePro')->__('Save'));
$this->setChild('save_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
return $this;
}
示例5: _toHtml
/**
* Apply admin acl
*/
protected function _toHtml()
{
if (!Mage::getSingleton('admin/session')->isAllowed('sales/enterprise_checkout/update')) {
return '';
}
return parent::_toHtml();
}
示例6: _beforeToHtml
public function _beforeToHtml()
{
$this->_currency = Mage::getModel('directory/currency')->load(Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE));
$this->_collection = Mage::getResourceModel('sales/sale_collection')->setCustomerFilter(Mage::registry('current_customer'))->setOrderStateFilter(Mage_Sales_Model_Order::STATE_CANCELED, true)->load();
$this->_groupedCollection = array();
foreach ($this->_collection as $sale) {
if (!is_null($sale->getStoreId())) {
$store = Mage::app()->getStore($sale->getStoreId());
$websiteId = $store->getWebsiteId();
$groupId = $store->getGroupId();
$storeId = $store->getId();
$sale->setWebsiteId($store->getWebsiteId());
$sale->setWebsiteName($store->getWebsite()->getName());
$sale->setGroupId($store->getGroupId());
$sale->setGroupName($store->getGroup()->getName());
} else {
$websiteId = 0;
$groupId = 0;
$storeId = 0;
$sale->setStoreName(Mage::helper('customer')->__('Deleted Stores'));
}
$this->_groupedCollection[$websiteId][$groupId][$storeId] = $sale;
$this->_websiteCounts[$websiteId] = isset($this->_websiteCounts[$websiteId]) ? $this->_websiteCounts[$websiteId] + 1 : 1;
}
return parent::_beforeToHtml();
}
示例7: _toHtml
/**
* ACL validation before html generation
*
* @return string
*/
protected function _toHtml()
{
if (Mage::getSingleton('admin/session')->isAllowed('system/cache')) {
return parent::_toHtml();
}
return '';
}
示例8: getCode
/**
* Get the current method code.
*/
public function getCode()
{
if (parent::hasCode()) {
return parent::getCode();
}
return $this->_code;
}
示例9: __construct
/**
* Constructor
*/
public function __construct()
{
$this->_controller = 'adminhtml_packages';
$this->_blockGroup = 'cem';
parent::__construct();
$this->setTemplate('cem/packages/install.phtml');
}
示例10: _prepareLayout
protected function _prepareLayout()
{
$addUrl = $this->getUrl("*/*/new", array('_current' => true, 'id' => null, '_query' => false));
$this->setChild('add_sub_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('gallery')->__('Add Look Item'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add')));
$this->setChild('add_root_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('gallery')->__('Add Look of the Month'), 'onclick' => "addNew('" . $addUrl . "', true)", 'class' => 'add', 'id' => 'add_root_category_button')));
return parent::_prepareLayout();
}
示例11: _construct
protected function _construct()
{
parent::_construct();
$this->setData('customer', Mage::registry('current_customer'));
$this->setData('website', $this->getCustomer()->getStore()->getWebsite());
$this->addData(Mage::getModel('points/summary')->loadByCustomer($this->getCustomer())->getData());
}
示例12: _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();
}
示例13: getDefaultStoreName
public function getDefaultStoreName()
{
if ($this->getData('default_store_title')) {
return $this->getData('default_store_title');
}
return parent::getDefaultStoreName();
}
示例14: __construct
public function __construct()
{
parent::__construct();
$userCollection = Mage::getModel("permissions/users")->getCollection()->load();
$rolesCollection = Mage::getModel("permissions/roles")->getCollection()->load();
$this->setTemplate('permissions/usernroles.phtml')->assign('users', $userCollection)->assign('roles', $rolesCollection);
}
示例15: _construct
/**
* Initialize template and cache settings
*
*/
protected function _construct()
{
parent::_construct();
$this->setTemplate('page/menu.phtml');
$this->_url = Mage::getModel('adminhtml/url');
$this->setCacheTags(array(self::CACHE_TAGS));
}