Mage_Adminhtml_Block_Report_Wishlist_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Report_Wishlist_Grid:

Mage_Adminhtml_Block_Widget_Grid 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

 _prepareCollection ()
 _prepareColumns ()


Detailed Description

Definition at line 34 of file Grid.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 Grid.php.

00038     {
00039         parent::__construct();
00040         $this->setId('wishlistReportGrid');
00041         $this->setDefaultSort('entity_id');
00042         $this->setDefaultDir('desc');
00043     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 45 of file Grid.php.

00046     {
00047 
00048         $collection = Mage::getResourceModel('reports/wishlist_product_collection')
00049             ->addAttributeToSelect('entity_id')
00050             ->addAttributeToSelect('name')
00051             ->addWishlistCount();
00052 
00053         $this->setCollection($collection);
00054 
00055         parent::_prepareCollection();
00056 
00057         return $this;
00058     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 60 of file Grid.php.

00061     {
00062         $this->addColumn('entity_id', array(
00063             'header'    =>Mage::helper('reports')->__('ID'),
00064             'width'     =>'50px',
00065             'index'     =>'entity_id'
00066         ));
00067 
00068         $this->addColumn('name', array(
00069             'header'    =>Mage::helper('reports')->__('Name'),
00070             'index'     =>'name'
00071         ));
00072 
00073         $this->addColumn('wishlists', array(
00074             'header'    =>Mage::helper('reports')->__('Wishlists'),
00075             'width'     =>'50px',
00076             'align'     =>'right',
00077             'index'     =>'wishlists'
00078         ));
00079 
00080         $this->addColumn('bought_from_wishlists', array(
00081             'header'    =>Mage::helper('reports')->__('Bought from wishlists'),
00082             'width'     =>'50px',
00083             'align'     =>'right',
00084             'sortable'  =>false,
00085             'index'     =>'bought_from_wishlists'
00086         ));
00087 
00088         $this->addColumn('w_vs_order', array(
00089             'header'    =>Mage::helper('reports')->__('Wishlist vs. Regular Order'),
00090             'width'     =>'50px',
00091             'align'     =>'right',
00092             'sortable'  =>false,
00093             'index'     =>'w_vs_order'
00094         ));
00095 
00096         $this->addColumn('num_deleted', array(
00097             'header'    =>Mage::helper('reports')->__('Number of times deleted'),
00098             'width'     =>'50px',
00099             'align'     =>'right',
00100             'sortable'  =>false,
00101             'index'     =>'num_deleted'
00102         ));
00103 
00104         $this->addExportType('*/*/exportWishlistCsv', Mage::helper('reports')->__('CSV'));
00105         $this->addExportType('*/*/exportWishlistExcel', Mage::helper('reports')->__('Excel'));
00106 
00107         $this->setFilterVisibility(false);
00108 
00109         return parent::_prepareColumns();
00110     }


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

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