Mage_Adminhtml_Block_Catalog_Product_Attribute_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Attribute_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 ()
 getRowUrl ($row)

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('attributeGrid');
00041         $this->setDefaultSort('attribute_code');
00042         $this->setDefaultDir('ASC');
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         $collection = Mage::getResourceModel('eav/entity_attribute_collection')
00048             ->setEntityTypeFilter( Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId() )
00049             ->addVisibleFilter();
00050         $this->setCollection($collection);
00051 
00052         return parent::_prepareCollection();
00053     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 55 of file Grid.php.

00056     {
00057         /*
00058         $this->addColumn('attribute_id', array(
00059             'header'=>Mage::helper('catalog')->__('ID'),
00060             'align'=>'right',
00061             'sortable'=>true,
00062             'width' => '50px',
00063             'index'=>'attribute_id'
00064         ));
00065         */
00066 
00067         $this->addColumn('attribute_code', array(
00068             'header'=>Mage::helper('catalog')->__('Attribute Code'),
00069             'sortable'=>true,
00070             'index'=>'attribute_code'
00071         ));
00072 
00073         $this->addColumn('frontend_label', array(
00074             'header'=>Mage::helper('catalog')->__('Attribute Label'),
00075             'sortable'=>true,
00076             'index'=>'frontend_label'
00077         ));
00078 
00079         $this->addColumn('is_visible', array(
00080             'header'=>Mage::helper('catalog')->__('Visible'),
00081             'sortable'=>true,
00082             'index'=>'is_visible_on_front',
00083             'type' => 'options',
00084             'options' => array(
00085                 '1' => Mage::helper('catalog')->__('Yes'),
00086                 '0' => Mage::helper('catalog')->__('No'),
00087             ),
00088             'align' => 'center',
00089         ));
00090 
00091         $this->addColumn('is_global', array(
00092             'header'=>Mage::helper('catalog')->__('Scope'),
00093             'sortable'=>true,
00094             'index'=>'is_global',
00095             'type' => 'options',
00096             'options' => array(
00097                 Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE =>Mage::helper('catalog')->__('Store View'),
00098                 Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE =>Mage::helper('catalog')->__('Website'),
00099                 Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL =>Mage::helper('catalog')->__('Global'),
00100             ),
00101             'align' => 'center',
00102         ));
00103 
00104         $this->addColumn('is_required', array(
00105             'header'=>Mage::helper('catalog')->__('Required'),
00106             'sortable'=>true,
00107             'index'=>'is_required',
00108             'type' => 'options',
00109             'options' => array(
00110                 '1' => Mage::helper('catalog')->__('Yes'),
00111                 '0' => Mage::helper('catalog')->__('No'),
00112             ),
00113             'align' => 'center',
00114         ));
00115 
00116         $this->addColumn('is_user_defined', array(
00117             'header'=>Mage::helper('catalog')->__('System'),
00118             'sortable'=>true,
00119             'index'=>'is_user_defined',
00120             'type' => 'options',
00121             'align' => 'center',
00122             'options' => array(
00123                 '0' => Mage::helper('catalog')->__('Yes'),   // intended reverted use
00124                 '1' => Mage::helper('catalog')->__('No'),    // intended reverted use
00125             ),
00126         ));
00127 
00128         $this->addColumn('is_searchable', array(
00129             'header'=>Mage::helper('catalog')->__('Searchable'),
00130             'sortable'=>true,
00131             'index'=>'is_searchable',
00132             'type' => 'options',
00133             'options' => array(
00134                 '1' => Mage::helper('catalog')->__('Yes'),
00135                 '0' => Mage::helper('catalog')->__('No'),
00136             ),
00137             'align' => 'center',
00138         ));
00139 
00140         $this->addColumn('is_filterable', array(
00141             'header'=>Mage::helper('catalog')->__('Use In Layered Navigation'),
00142             'sortable'=>true,
00143             'index'=>'is_filterable',
00144             'type' => 'options',
00145             'options' => array(
00146                 '1' => Mage::helper('catalog')->__('Filterable (with results)'),
00147                 '2' => Mage::helper('catalog')->__('Filterable (no results)'),
00148                 '0' => Mage::helper('catalog')->__('No'),
00149             ),
00150             'align' => 'center',
00151         ));
00152 
00153         $this->addColumn('is_comparable', array(
00154             'header'=>Mage::helper('catalog')->__('Comparable'),
00155             'sortable'=>true,
00156             'index'=>'is_comparable',
00157             'type' => 'options',
00158             'options' => array(
00159                 '1' => Mage::helper('catalog')->__('Yes'),
00160                 '0' => Mage::helper('catalog')->__('No'),
00161             ),
00162             'align' => 'center',
00163         ));
00164 
00165         return parent::_prepareColumns();
00166     }

getRowUrl ( row  ) 

Definition at line 168 of file Grid.php.

00169     {
00170         return $this->getUrl('*/*/edit', array('attribute_id' => $row->getAttributeId()));
00171     }


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

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