Mage_Catalog_Model_Resource_Eav_Mysql4_Config Class Reference

Inheritance diagram for Mage_Catalog_Model_Resource_Eav_Mysql4_Config:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract

List of all members.

Public Member Functions

 getEntityTypeId ()
 getAttributesUsedInListing ()
 getAttributesUsedForSortBy ()

Protected Member Functions

 _construct ()

Protected Attributes

 $_entityTypeId


Detailed Description

Definition at line 35 of file Config.php.


Member Function Documentation

_construct (  )  [protected]

Initialize connection

Reimplemented from Mage_Core_Model_Resource_Abstract.

Definition at line 48 of file Config.php.

00048                                     {
00049         $this->_init('eav/attribute', 'attribute_id');
00050     }

getAttributesUsedForSortBy (  ) 

Retrieve Used Product Attributes for Catalog Product Listing Sort By

Returns:
array

Definition at line 86 of file Config.php.

00086                                                  {
00087         $select = $this->_getReadAdapter()->select()
00088             ->from($this->getTable('eav/attribute'))
00089             ->where('entity_type_id=?', $this->getEntityTypeId())
00090             ->where('used_for_sort_by=?', 1);
00091         return $this->_getReadAdapter()->fetchAll($select);
00092     }

getAttributesUsedInListing (  ) 

Retrieve Product Attributes Used in Catalog Product listing

Returns:
array

Definition at line 73 of file Config.php.

00073                                                  {
00074         $select = $this->_getReadAdapter()->select()
00075             ->from($this->getTable('eav/attribute'))
00076             ->where('entity_type_id=?', $this->getEntityTypeId())
00077             ->where('used_in_product_listing=?', 1);
00078         return $this->_getReadAdapter()->fetchAll($select);
00079     }

getEntityTypeId (  ) 

Retrieve catalog_product entity type id

Returns:
int

Definition at line 57 of file Config.php.

00058     {
00059         if (is_null($this->_entityTypeId)) {
00060             $select = $this->_getReadAdapter()->select()
00061                 ->from($this->getTable('eav/entity_type'), 'entity_type_id')
00062                 ->where('entity_type_code=?', 'catalog_product');
00063             $this->_entityTypeId = $this->_getReadAdapter()->fetchOne($select);
00064         }
00065         return $this->_entityTypeId;
00066     }


Member Data Documentation

$_entityTypeId [protected]

Definition at line 42 of file Config.php.


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

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