Mage_Adminhtml_Block_Customer_Edit_Tabs Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Customer_Edit_Tabs:

Mage_Adminhtml_Block_Widget_Tabs Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()

Protected Member Functions

 _beforeToHtml ()
 _updateActiveTab ()


Detailed Description

Definition at line 34 of file Tabs.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 37 of file Tabs.php.

00038     {
00039         parent::__construct();
00040         $this->setId('customer_info_tabs');
00041         $this->setDestElementId('edit_form');
00042         $this->setTitle(Mage::helper('customer')->__('Customer Information'));
00043     }


Member Function Documentation

_beforeToHtml (  )  [protected]

Before rendering html, but after trying to load cache

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Adminhtml_Block_Widget_Tabs.

Definition at line 45 of file Tabs.php.

00046     {
00047 /*
00048         if (Mage::registry('current_customer')->getId()) {
00049             $this->addTab('view', array(
00050                 'label'     => Mage::helper('customer')->__('Customer View'),
00051                 'content'   => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_view')->toHtml(),
00052                 'active'    => true
00053             ));
00054         }
00055 */
00056         $this->addTab('account', array(
00057             'label'     => Mage::helper('customer')->__('Account Information'),
00058             'content'   => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_account')->initForm()->toHtml(),
00059             'active'    => Mage::registry('current_customer')->getId() ? false : true
00060         ));
00061 
00062         $this->addTab('addresses', array(
00063             'label'     => Mage::helper('customer')->__('Addresses'),
00064             'content'   => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_addresses')->initForm()->toHtml(),
00065         ));
00066 
00067 
00068         // load: Orders, Shopping Cart, Wishlist, Product Reviews, Product Tags - with ajax
00069 
00070         if (Mage::registry('current_customer')->getId()) {
00071             $this->addTab('orders', array(
00072                 'label'     => Mage::helper('customer')->__('Orders'),
00073                 'class'     => 'ajax',
00074                 'url'       => $this->getUrl('*/*/orders', array('_current' => true)),
00075              ));
00076 
00077             $this->addTab('cart', array(
00078                 'label'     => Mage::helper('customer')->__('Shopping Cart'),
00079                 'class'     => 'ajax',
00080                 'url'       => $this->getUrl('*/*/carts', array('_current' => true)),
00081             ));
00082 
00083             $this->addTab('wishlist', array(
00084                 'label'     => Mage::helper('customer')->__('Wishlist'),
00085                 'class'     => 'ajax',
00086                 'url'       => $this->getUrl('*/*/wishlist', array('_current' => true)),
00087             ));
00088 
00089             $this->addTab('newsletter', array(
00090                 'label'     => Mage::helper('customer')->__('Newsletter'),
00091                 'content'   => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter')->initForm()->toHtml()
00092             ));
00093 
00094             $this->addTab('reviews', array(
00095                 'label'     => Mage::helper('customer')->__('Product Reviews'),
00096                 'class'     => 'ajax',
00097                 'url'       => $this->getUrl('*/*/productReviews', array('_current' => true)),
00098             ));
00099 
00100             $this->addTab('tags', array(
00101                 'label'     => Mage::helper('customer')->__('Product Tags'),
00102                 'class'     => 'ajax',
00103                 'url'       => $this->getUrl('*/*/productTags', array('_current' => true)),
00104             ));
00105         }
00106         
00107         $this->_updateActiveTab();
00108         Varien_Profiler::stop('customer/tabs');
00109         return parent::_beforeToHtml();
00110     }

_updateActiveTab (  )  [protected]

Definition at line 112 of file Tabs.php.

00113     {
00114         $tabId = $this->getRequest()->getParam('tab');
00115         if( $tabId ) {
00116             $tabId = preg_replace("#{$this->getId()}_#", '', $tabId);
00117             if($tabId) {
00118                 $this->setActiveTab($tabId);
00119             }
00120         }
00121     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:48 2009 for Magento by  doxygen 1.5.8