本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Container类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Container类的具体用法?PHP Mage_Adminhtml_Block_Widget_Container怎么用?PHP Mage_Adminhtml_Block_Widget_Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Adminhtml_Block_Widget_Container类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _buildBlock
/**
* Composes a container with several buttons in it
*
* @param array $titles
* @return Mage_Adminhtml_Block_Widget_Container
*/
protected function _buildBlock($titles)
{
$layout = new Mage_Core_Model_Layout();
$block = new Mage_Adminhtml_Block_Widget_Container();
foreach ($titles as $id => $title) {
$block->addButton($id, array('title' => $title));
}
$layout->addBlock($block, 'block');
return $block;
}
示例2: _prepareLayout
protected function _prepareLayout()
{
if ($this->_blockGroup && $this->_controller) {
$this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_' . $this->_mode . 'form'));
}
return Mage_Adminhtml_Block_Widget_Container::_prepareLayout();
}
示例3: __construct
public function __construct()
{
$this->_controller = 'adminhtml_printbarcode';
$this->_blockGroup = 'inventorybarcode';
$this->_headerText = Mage::helper('inventorybarcode')->__('Print Barcodes');
parent::__construct();
}
示例4: __construct
public function __construct()
{
$this->_setHeaderText();
$block_module_groupname = "ReverbSync";
$this->_objectId = 'reverb_product_sync_container';
$this->setTemplate('widget/view/container.phtml');
parent::__construct();
$bulk_sync_process_button = array('action_url' => Mage::getModel('adminhtml/url')->getUrl('adminhtml/ReverbSync_listings_sync/bulkSync'), 'label' => 'Bulk Product Sync');
$clear_all_tasks_button = array('action_url' => Mage::getModel('adminhtml/url')->getUrl('adminhtml/ReverbSync_listings_sync/clearAllTasks'), 'label' => 'Clear All Sync Tasks');
$clear_successful_tasks_button = array('action_url' => Mage::getModel('adminhtml/url')->getUrl('adminhtml/ReverbSync_listings_sync/clearSuccessfulTasks'), 'label' => 'Clear Successful Sync Tasks');
$action_buttons_array['bulk_product_sync'] = $bulk_sync_process_button;
$action_buttons_array['clear_all_sync_tasks'] = $clear_all_tasks_button;
$action_buttons_array['clear_successful_sync_tasks'] = $clear_successful_tasks_button;
foreach ($action_buttons_array as $button_id => $button_data) {
$button_action_url = isset($button_data['action_url']) ? $button_data['action_url'] : '';
if (empty($button_action_url)) {
// Require label to be defined
continue;
}
$button_label = isset($button_data['label']) ? $button_data['label'] : '';
if (empty($button_label)) {
// Require label to be defined
continue;
}
$this->_addButton($button_id, array('label' => Mage::helper($block_module_groupname)->__($button_label), 'onclick' => "document.location='" . $button_action_url . "'", 'level' => -1));
}
}
示例5: _toHtml
protected function _toHtml()
{
$this->setJobIdHtml($this->escapeHtml($this->_job->getId()));
$this->setJobNameHtml($this->escapeHtml($this->_job->getName()));
$this->setJobNameHtml($this->escapeHtml($this->_job->getName()));
$storeId = $this->_job->getStoreId();
$store = Mage::app()->getStore($storeId);
$this->setStoreNameHtml($this->escapeHtml($store->getName()));
$this->setJobQueueHtml($this->escapeHtml($this->_job->getQueue()));
$this->setAttemptsHtml($this->escapeHtml($this->_job->getAttempts()));
$runAt = strtotime($this->_job->getRunAt()) ? $this->formatDate($this->_job->getRunAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true) : $this->__('N/A');
$this->setRunAtHtml($this->escapeHtml($runAt));
$status = $this->__("Pending");
if ($this->_job->getFailedAt()) {
$status = $this->__('Failed');
} else {
if ($this->_job->getLockedAt()) {
$status = $this->__('In Process');
}
}
$this->setStatusHtml($this->escapeHtml($status));
$this->setErrorHtml($this->escapeHtml($this->_job->getError()));
$createdAt = strtotime($this->_job->getCreatedAt()) ? $this->formatDate($this->_job->getCreatedAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true) : $this->__('N/A');
$this->setCreatedAtHtml($this->escapeHtml($createdAt));
return parent::_toHtml();
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->_objectId = 'moderator_id';
$this->_blockGroup = 'moderator';
$this->_controller = 'adminhtml_moderators';
}
示例7: _beforeToHtml
/**
* Set title and a hack for tabs container
*
* @return Mage_Sales_Block_Adminhtml_Recurring_Profile_View
*/
protected function _beforeToHtml()
{
$profile = Mage::registry('current_recurring_profile');
$this->_headerText = Mage::helper('sales')->__('Recurring Profile # %s', $profile->getReferenceId());
$this->setViewHtml('<div id="' . $this->getDestElementId() . '"></div>');
return parent::_beforeToHtml();
}
示例8: __construct
public function __construct()
{
$this->_controller = "adminhtml_chart";
$this->_blockGroup = "watchlog";
parent::__construct();
$this->setTemplate('watchlog/chart.phtml');
}
示例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();
}
示例10: _beforeToHtml
protected function _beforeToHtml()
{
$ticket = $this->getTicket();
$this->_headerText = Mage::helper('inchoo_tickets')->__('Ticket #%s - %s', $ticket->getTicketId(), $this->escapeHtml($ticket->getSubject()));
$this->setViewHtml('<div id="' . $this->getDestElementId() . '"></div>');
return parent::_beforeToHtml();
}
示例11: _beforeToHtml
protected function _beforeToHtml()
{
// Magento order data
// ---------------
$this->realMagentoOrderId = NULL;
$magentoOrder = $this->order->getMagentoOrder();
if (!is_null($magentoOrder)) {
$this->realMagentoOrderId = $magentoOrder->getRealOrderId();
}
// ---------------
// ---------------
if (!is_null($magentoOrder) && $magentoOrder->hasShipments()) {
$url = $this->getUrl('*/adminhtml_order/resubmitShippingInfo', array('id' => $this->order->getId()));
$data = array('class' => '', 'label' => Mage::helper('M2ePro')->__('Resend Shipping Information'), 'onclick' => 'setLocation(\'' . $url . '\');');
$buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
$this->setChild('resubmit_shipping_info', $buttonBlock);
}
// ---------------
// Shipping data
// ---------------
/** @var $shippingAddress Ess_M2ePro_Model_Buy_Order_ShippingAddress */
$shippingAddress = $this->order->getShippingAddress();
$this->shippingAddress = $shippingAddress->getData();
$this->shippingAddress['country_name'] = $shippingAddress->getCountryName();
$this->shippingAddress['phone'] = $this->order->getChildObject()->getBillingAddress()->getData('phone');
$this->shippingAddress['company'] = $this->order->getChildObject()->getBillingAddress()->getData('company');
// ---------------
$this->setChild('item', $this->getLayout()->createBlock('M2ePro/adminhtml_common_buy_order_view_item'));
$this->setChild('item_edit', $this->getLayout()->createBlock('M2ePro/adminhtml_order_item_edit'));
$this->setChild('log', $this->getLayout()->createBlock('M2ePro/adminhtml_order_view_log_grid'));
return parent::_beforeToHtml();
}
示例12: _beforeToHtml
protected function _beforeToHtml()
{
parent::_beforeToHtml();
// --------------------------------------
$listing = Mage::helper('M2ePro/Component_Ebay')->getCachedObject('Listing', $this->getRequest()->getParam('listing_id'));
$viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
$this->setChild('view_header', $viewHeaderBlock);
// --------------------------------------
// --------------------------------------
$listingData = Mage::helper('M2ePro/Data_Global')->getValue('temp_data');
$categoryMode = $this->getData('category_mode');
$categoryValue = $this->getData('category_value');
$internalData = $this->getData('internal_data');
$specifics = $this->getData('specifics');
$specificBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_category_specific');
$specificBlock->setMarketplaceId($listingData['marketplace_id']);
$specificBlock->setCategoryMode($categoryMode);
$specificBlock->setCategoryValue($categoryValue);
if (!empty($internalData)) {
$specificBlock->setInternalData($internalData);
}
if (!empty($specifics)) {
$specificBlock->setSelectedSpecifics($specifics);
}
$this->setChild('category_specific', $specificBlock);
// --------------------------------------
// --------------------------------------
if ($categoryMode == Ess_M2ePro_Model_Ebay_Template_Category::CATEGORY_MODE_EBAY) {
$this->_selectedCategoryPath = Mage::helper('M2ePro/Component_Ebay_Category_Ebay')->getPath($categoryValue, $listingData['marketplace_id']);
} else {
$attributeLabel = Mage::helper('M2ePro/Magento_Attribute')->getAttributeLabel($categoryValue);
$this->_selectedCategoryPath = Mage::helper('M2ePro')->__('Magento Attribute') . ' > ' . $attributeLabel;
}
// --------------------------------------
}
示例13: _prepareLayout
protected function _prepareLayout()
{
if ($this->_blockGroup && $this->_controller && $this->_mode) {
$this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '_Block_' . str_replace(' ', '_', ucwords(str_replace('_', ' ', $this->_controller . '_' . $this->_mode))) . '_Form'));
}
return parent::_prepareLayout();
}
示例14: _beforeToHtml
protected function _beforeToHtml()
{
if (is_null($this->compatibilityType)) {
throw new LogicException('Compatibility type was not set.');
}
return parent::_beforeToHtml();
}
示例15: __construct
/**
* Initialize button
*/
public function __construct()
{
$this->_controller = 'adminhtml_urlrewrite';
$this->_headerText = $this->__('URL Redirect');
parent::__construct();
$this->_addButton('back', array('label' => $this->__('Back'), 'onclick' => sprintf("setLocation('%s')", $this->getBackUrl()), 'class' => 'back'), -1);
}