Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Catalog_Model_Entity_Product_Attribute_Design_Options_Container
  • Mage_Catalog_Model_Product_Attribute_Source_Inputtype
  • Mage_Eav_Block_Adminhtml_Attribute_Edit_Js
  • Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract
  • Mage_Eav_Block_Adminhtml_Attribute_Edit_Options_Abstract
  • Mage_Eav_Helper_Data
  • Mage_Eav_Model_Adminhtml_System_Config_Source_Inputtype
  • Mage_Eav_Model_Adminhtml_System_Config_Source_Inputtype_Validator
  • Mage_Eav_Model_Attribute
  • Mage_Eav_Model_Attribute_Data
  • Mage_Eav_Model_Attribute_Data_Abstract
  • Mage_Eav_Model_Attribute_Data_Boolean
  • Mage_Eav_Model_Attribute_Data_Date
  • Mage_Eav_Model_Attribute_Data_File
  • Mage_Eav_Model_Attribute_Data_Hidden
  • Mage_Eav_Model_Attribute_Data_Image
  • Mage_Eav_Model_Attribute_Data_Multiline
  • Mage_Eav_Model_Attribute_Data_Multiselect
  • Mage_Eav_Model_Attribute_Data_Select
  • Mage_Eav_Model_Attribute_Data_Text
  • Mage_Eav_Model_Attribute_Data_Textarea
  • Mage_Eav_Model_Config
  • Mage_Eav_Model_Convert_Adapter_Entity
  • Mage_Eav_Model_Convert_Adapter_Grid
  • Mage_Eav_Model_Convert_Parser_Abstract
  • Mage_Eav_Model_Entity
  • Mage_Eav_Model_Entity_Abstract
  • Mage_Eav_Model_Entity_Attribute
  • Mage_Eav_Model_Entity_Attribute_Abstract
  • Mage_Eav_Model_Entity_Attribute_Backend_Abstract
  • Mage_Eav_Model_Entity_Attribute_Backend_Array
  • Mage_Eav_Model_Entity_Attribute_Backend_Datetime
  • Mage_Eav_Model_Entity_Attribute_Backend_Default
  • Mage_Eav_Model_Entity_Attribute_Backend_Increment
  • Mage_Eav_Model_Entity_Attribute_Backend_Serialized
  • Mage_Eav_Model_Entity_Attribute_Backend_Store
  • Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
  • Mage_Eav_Model_Entity_Attribute_Backend_Time_Updated
  • Mage_Eav_Model_Entity_Attribute_Frontend_Abstract
  • Mage_Eav_Model_Entity_Attribute_Frontend_Datetime
  • Mage_Eav_Model_Entity_Attribute_Frontend_Default
  • Mage_Eav_Model_Entity_Attribute_Group
  • Mage_Eav_Model_Entity_Attribute_Option
  • Mage_Eav_Model_Entity_Attribute_Set
  • Mage_Eav_Model_Entity_Attribute_Source_Abstract
  • Mage_Eav_Model_Entity_Attribute_Source_Boolean
  • Mage_Eav_Model_Entity_Attribute_Source_Config
  • Mage_Eav_Model_Entity_Attribute_Source_Store
  • Mage_Eav_Model_Entity_Attribute_Source_Table
  • Mage_Eav_Model_Entity_Collection
  • Mage_Eav_Model_Entity_Collection_Abstract
  • Mage_Eav_Model_Entity_Increment_Abstract
  • Mage_Eav_Model_Entity_Increment_Alphanum
  • Mage_Eav_Model_Entity_Increment_Numeric
  • Mage_Eav_Model_Entity_Setup
  • Mage_Eav_Model_Entity_Store
  • Mage_Eav_Model_Entity_Type
  • Mage_Eav_Model_Form
  • Mage_Eav_Model_Form_Element
  • Mage_Eav_Model_Form_Fieldset
  • Mage_Eav_Model_Form_Type
  • Mage_Eav_Model_Mysql4_Config
  • Mage_Eav_Model_Mysql4_Entity_Attribute
  • Mage_Eav_Model_Mysql4_Entity_Attribute_Collection
  • Mage_Eav_Model_Mysql4_Entity_Attribute_Group
  • Mage_Eav_Model_Mysql4_Entity_Attribute_Group_Collection
  • Mage_Eav_Model_Mysql4_Entity_Attribute_Option
  • Mage_Eav_Model_Mysql4_Entity_Attribute_Option_Collection
  • Mage_Eav_Model_Mysql4_Entity_Attribute_Set
  • Mage_Eav_Model_Mysql4_Entity_Attribute_Set_Collection
  • Mage_Eav_Model_Mysql4_Entity_Store
  • Mage_Eav_Model_Mysql4_Entity_Type
  • Mage_Eav_Model_Mysql4_Entity_Type_Collection
  • Mage_Eav_Model_Mysql4_Form_Element
  • Mage_Eav_Model_Mysql4_Form_Element_Collection
  • Mage_Eav_Model_Mysql4_Form_Fieldset
  • Mage_Eav_Model_Mysql4_Form_Fieldset_Collection
  • Mage_Eav_Model_Mysql4_Form_Type
  • Mage_Eav_Model_Mysql4_Form_Type_Collection
  • Mage_Eav_Model_Resource_Attribute
  • Mage_Eav_Model_Resource_Attribute_Collection
  • Mage_Eav_Model_Resource_Config
  • Mage_Eav_Model_Resource_Entity_Attribute
  • Mage_Eav_Model_Resource_Entity_Attribute_Collection
  • Mage_Eav_Model_Resource_Entity_Attribute_Group
  • Mage_Eav_Model_Resource_Entity_Attribute_Group_Collection
  • Mage_Eav_Model_Resource_Entity_Attribute_Option
  • Mage_Eav_Model_Resource_Entity_Attribute_Option_Collection
  • Mage_Eav_Model_Resource_Entity_Attribute_Set
  • Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection
  • Mage_Eav_Model_Resource_Entity_Store
  • Mage_Eav_Model_Resource_Entity_Type
  • Mage_Eav_Model_Resource_Entity_Type_Collection
  • Mage_Eav_Model_Resource_Form_Attribute
  • Mage_Eav_Model_Resource_Form_Attribute_Collection
  • Mage_Eav_Model_Resource_Form_Element
  • Mage_Eav_Model_Resource_Form_Element_Collection
  • Mage_Eav_Model_Resource_Form_Fieldset
  • Mage_Eav_Model_Resource_Form_Fieldset_Collection
  • Mage_Eav_Model_Resource_Form_Type
  • Mage_Eav_Model_Resource_Form_Type_Collection
  • Mage_Eav_Model_Resource_Helper_Mysql4

Interfaces

  • Mage_Eav_Model_Entity_Attribute_Backend_Interface
  • Mage_Eav_Model_Entity_Attribute_Frontend_Interface
  • Mage_Eav_Model_Entity_Attribute_Interface
  • Mage_Eav_Model_Entity_Attribute_Source_Interface
  • Mage_Eav_Model_Entity_Increment_Interface
  • Mage_Eav_Model_Entity_Interface

Exceptions

  • Mage_Eav_Exception
  • Mage_Eav_Model_Entity_Attribute_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Eav_Model_Entity_Collection_Abstract

Entity/Attribute/Model - collection abstract

Varien_Data_Collection_Db
Extended by Mage_Eav_Model_Entity_Collection_Abstract

Direct known subclasses

Mage_Catalog_Model_Resource_Collection_Abstract, Mage_Customer_Model_Resource_Address_Collection, Mage_Sales_Model_Entity_Order_Invoice_Collection, Mage_Sales_Model_Entity_Order_Invoice_Comment_Collection, Mage_Sales_Model_Entity_Order_Invoice_Item_Collection, Mage_Sales_Model_Entity_Order_Item_Collection, Mage_Sales_Model_Entity_Order_Payment_Collection, Mage_Sales_Model_Entity_Order_Shipment_Collection, Mage_Sales_Model_Entity_Order_Shipment_Comment_Collection, Mage_Sales_Model_Entity_Order_Shipment_Item_Collection, Mage_Sales_Model_Entity_Order_Shipment_Track_Collection, Mage_Sales_Model_Entity_Order_Status_History_Collection, Mage_Customer_Model_Resource_Customer_Collection, Mage_Sales_Model_Entity_Quote_Address_Collection, Mage_Sales_Model_Entity_Quote_Address_Item_Collection, Mage_Sales_Model_Entity_Quote_Address_Rate_Collection, Mage_Sales_Model_Entity_Quote_Collection, Mage_Sales_Model_Entity_Quote_Item_Collection, Mage_Sales_Model_Entity_Quote_Payment_Collection, Mage_Customer_Model_Resource_Wishlist_Collection, Mage_Eav_Model_Entity_Collection, Mage_Sales_Model_Entity_Order_Address_Collection, Mage_Sales_Model_Entity_Order_Collection, Mage_Sales_Model_Entity_Order_Creditmemo_Collection, Mage_Sales_Model_Entity_Order_Creditmemo_Comment_Collection, Mage_Sales_Model_Entity_Order_Creditmemo_Item_Collection

Indirect known subclasses

Mage_Bundle_Model_Mysql4_Selection_Collection, Mage_Bundle_Model_Resource_Selection_Collection, Mage_Catalog_Model_Resource_Product_Compare_Item_Collection, Mage_Catalog_Model_Resource_Product_Link_Product_Collection, Mage_Catalog_Model_Resource_Product_Type_Configurable_Product_Collection, Mage_CatalogSearch_Model_Mysql4_Advanced_Collection, Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection, Mage_CatalogSearch_Model_Mysql4_Search_Collection, Mage_CatalogSearch_Model_Resource_Advanced_Collection, Mage_CatalogSearch_Model_Resource_Fulltext_Collection, Mage_CatalogSearch_Model_Resource_Search_Collection, Mage_Customer_Model_Entity_Address_Collection, Mage_Catalog_Model_Resource_Category_Collection, Mage_Customer_Model_Entity_Customer_Collection, Mage_Customer_Model_Entity_Wishlist_Collection, Mage_ProductAlert_Model_Mysql4_Price_Customer_Collection, Mage_ProductAlert_Model_Mysql4_Stock_Customer_Collection, Mage_ProductAlert_Model_Resource_Price_Customer_Collection, Mage_ProductAlert_Model_Resource_Stock_Customer_Collection, Mage_Reports_Model_Mysql4_Accounts_Collection, Mage_Reports_Model_Mysql4_Coupons_Collection, Mage_Reports_Model_Mysql4_Customer_Collection, Mage_Reports_Model_Mysql4_Invoiced_Collection, Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection, Mage_Reports_Model_Mysql4_Product_Collection, Mage_Reports_Model_Mysql4_Product_Downloads_Collection, Mage_Reports_Model_Mysql4_Product_Index_Collection_Abstract, Mage_Reports_Model_Mysql4_Product_Index_Compared_Collection, Mage_Reports_Model_Mysql4_Product_Index_Viewed_Collection, Mage_Reports_Model_Mysql4_Product_Lowstock_Collection, Mage_Reports_Model_Mysql4_Product_Ordered_Collection, Mage_Reports_Model_Mysql4_Product_Sold_Collection, Mage_Reports_Model_Mysql4_Product_Viewed_Collection, Mage_Reports_Model_Mysql4_Refunded_Collection, Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract, Mage_Reports_Model_Mysql4_Review_Product_Collection, Mage_Reports_Model_Mysql4_Shipping_Collection, Mage_Reports_Model_Mysql4_Tag_Customer_Collection, Mage_Reports_Model_Mysql4_Tag_Product_Collection, Mage_Reports_Model_Mysql4_Tax_Collection, Mage_Reports_Model_Mysql4_Wishlist_Product_Collection, Mage_Reports_Model_Resource_Accounts_Collection, Mage_Reports_Model_Resource_Coupons_Collection, Mage_Reports_Model_Resource_Customer_Collection, Mage_Reports_Model_Resource_Invoiced_Collection, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection, Mage_Reports_Model_Resource_Product_Collection, Mage_Reports_Model_Resource_Product_Downloads_Collection, Mage_Reports_Model_Resource_Product_Index_Collection_Abstract, Mage_Reports_Model_Resource_Product_Index_Compared_Collection, Mage_Reports_Model_Resource_Product_Index_Viewed_Collection, Mage_Reports_Model_Resource_Product_Lowstock_Collection, Mage_Reports_Model_Resource_Product_Ordered_Collection, Mage_Reports_Model_Resource_Product_Sold_Collection, Mage_Reports_Model_Resource_Product_Viewed_Collection, Mage_Reports_Model_Resource_Refunded_Collection, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection, Mage_Reports_Model_Resource_Review_Product_Collection, Mage_Reports_Model_Resource_Shipping_Collection, Mage_Reports_Model_Resource_Shopcart_Product_Collection, Mage_Reports_Model_Resource_Tag_Customer_Collection, Mage_Reports_Model_Resource_Tag_Product_Collection, Mage_Reports_Model_Resource_Tax_Collection, Mage_Reports_Model_Resource_Wishlist_Product_Collection, Mage_Review_Model_Mysql4_Review_Product_Collection, Mage_Review_Model_Resource_Review_Product_Collection, Mage_Tag_Model_Entity_Customer_Collection, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection, Mage_Tag_Model_Mysql4_Customer_Collection, Mage_Tag_Model_Mysql4_Product_Collection, Mage_Tag_Model_Resource_Customer_Collection, Mage_Tag_Model_Resource_Product_Collection, Mage_Wishlist_Model_Mysql4_Product_Collection, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Product_Collection, Mage_Catalog_Model_Resource_Product_Collection
Abstract
Package: Mage\Eav
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Eav/Model/Entity/Collection/Abstract.php
Methods summary
public
# __construct( Mage_Core_Model_Resource_Abstract $resource = null )

Collection constructor

Collection constructor

Parameters

$resource
Mage_Core_Model_Resource_Abstract
$resource
protected
# _construct( )

Initialize collection

Initialize collection

public string
# getTable( string $table )

Retreive table name

Retreive table name

Parameters

$table
string
$table

Returns

string
protected Mage_Eav_Model_Entity_Collection_Abstract
# _prepareStaticFields( )

Prepare static entity fields

Prepare static entity fields

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected Mage_Eav_Model_Entity_Collection_Abstract
# _initSelect( )

Init select

Init select

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected Mage_Core_Model_Mysql4_Collection_Abstract
# _init( string $model, mixed $entityModel = null )

Standard resource collection initalization

Standard resource collection initalization

Parameters

$model
string
$model
$entityModel

Returns

Mage_Core_Model_Mysql4_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# setEntity( Mage_Eav_Model_Entity_Abstract $entity )

Set entity to use for attributes

Set entity to use for attributes

Parameters

$entity
Mage_Eav_Model_Entity_Abstract
$entity

Returns

Mage_Eav_Model_Entity_Collection_Abstract

Throws

Mage_Eav_Exception
public Mage_Eav_Model_Entity_Abstract
# getEntity( )

Get collection's entity object

Get collection's entity object

Returns

Mage_Eav_Model_Entity_Abstract
public Mage_Core_Model_Mysql4_Abstract
# getResource( )

Get resource instance

Get resource instance

Returns

Mage_Core_Model_Mysql4_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# setObject( Varien_Object $object = null )

Set template object for the collection

Set template object for the collection

Parameters

$object
Varien_Object
$object

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# addItem( Varien_Object $object )

Add an object to the collection

Add an object to the collection

Parameters

$object
Varien_Object
$object

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Attribute_Abstract
# getAttribute( string $attributeCode )

Retrieve entity attribute

Retrieve entity attribute

Parameters

$attributeCode
string
$attributeCode

Returns

Mage_Eav_Model_Entity_Attribute_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# addAttributeToFilter( Mage_Eav_Model_Entity_Attribute_Interface|integer|string|array $attribute, null|string|array $condition = null, string $joinType = 'inner' )

Add attribute filter to collection

Add attribute filter to collection

If $attribute is an array will add OR condition with following format: array( array('attribute'=>'firstname', 'like'=>'test%'), array('attribute'=>'lastname', 'like'=>'test%'), )

Parameters

$attribute
Mage_Eav_Model_Entity_Attribute_Interface|integer|string|array
$attribute
$condition
null|string|array
$condition
$joinType
string
$operator

Returns

Mage_Eav_Model_Entity_Collection_Abstract

See

self::_getConditionSql for $condition
public
# addFieldToFilter( mixed $attribute, mixed $condition = null )

Wrapper for compatibility with Varien_Data_Collection_Db

Wrapper for compatibility with Varien_Data_Collection_Db

Parameters

$attribute
mixed
$attribute
$condition
mixed
$condition
public Mage_Eav_Model_Entity_Collection_Abstract
# addAttributeToSort( string $attribute, string $dir = self::SORT_ORDER_ASC )

Add attribute to sort order

Add attribute to sort order

Parameters

$attribute
string
$attribute
$dir
string
$dir

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected string|Zend_Db_Expr
# _prepareOrderExpression( string $field )

Retrieve attribute expression by specified column

Retrieve attribute expression by specified column

Parameters

$field
string
$field

Returns

string|Zend_Db_Expr
public Mage_Eav_Model_Entity_Collection_Abstract
# addAttributeToSelect( array|string|integer|Mage_Core_Model_Config_Element $attribute, false|string $joinType = false )

Add attribute to entities in collection

Add attribute to entities in collection

If $attribute=='*' select all attributes

Parameters

$attribute
array|string|integer|Mage_Core_Model_Config_Element
$attribute
$joinType
false|string
$joinType flag for joining attribute

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public
# addEntityTypeToSelect( mixed $entityType, mixed $prefix )
public Mage_Eav_Model_Entity_Collection_Abstract
# addStaticField( string $field )

Add field to static

Add field to static

Parameters

$field
string
$field

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# addExpressionAttributeToSelect( string $alias, string $expression, string $attribute )

Add attribute expression (SUM, COUNT, etc)

Add attribute expression (SUM, COUNT, etc)

Example: ('sub_total', 'SUM({{attribute}})', 'revenue') Example: ('sub_total', 'SUM({{revenue}})', 'revenue')

For some functions like SUM use groupByAttribute.

Parameters

$alias
string
$alias
$expression
string
$expression
$attribute
string
$attribute

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public
# groupByAttribute( string|array $attribute )

Groups results by specified attribute

Groups results by specified attribute

Parameters

$attribute
string|array
$attribute
public Mage_Eav_Model_Entity_Collection_Abstract
# joinAttribute( string $alias, string|Mage_Eav_Model_Entity_Attribute_Abstract $attribute, string $bind, string $filter = null, string $joinType = 'inner', mixed $storeId = null )

Add attribute from joined entity to select

Add attribute from joined entity to select

Examples: ('billing_firstname', 'customer_address/firstname', 'default_billing') ('billing_lastname', 'customer_address/lastname', 'default_billing') ('shipping_lastname', 'customer_address/lastname', 'default_billing') ('shipping_postalcode', 'customer_address/postalcode', 'default_shipping') ('shipping_city', $cityAttribute, 'default_shipping')

Developer is encouraged to use existing instances of attributes and entities After first use of string entity name it will be cached in the collection

Parameters

$alias
string
$alias alias for the joined attribute
$attribute
string|Mage_Eav_Model_Entity_Attribute_Abstract
$attribute
$bind
string
$bind attribute of the main entity to link with joined $filter
$filter
string
$filter primary key for the joined entity (entity_id default)
$joinType
string
$joinType inner|left
$storeId

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# joinField( string $alias, string $table, string $field, string $bind, string|array $cond = null, string $joinType = 'inner' )

Join regular table field and use an attribute as fk

Join regular table field and use an attribute as fk

Examples: ('country_name', 'directory/country_name', 'name', 'country_id=shipping_country', "{{table}}.language_code='en'", 'left')

Parameters

$alias
string
$alias 'country_name'
$table
string
$table 'directory/country_name'
$field
string
$field 'name'
$bind
string
$bind 'PK(country_id)=FK(shipping_country_id)'
$cond
string|array
$cond "{{table}}.language_code='en'" OR array('language_code'=>'en')
$joinType
string
$joinType 'left'

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# joinTable( string|array $table, string $bind, string|array $fields = null, null|array $cond = null, string $joinType = 'inner' )

Join a table

Join a table

Parameters

$table
string|array
$table
$bind
string
$bind
$fields
string|array
$fields
$cond
null|array
$cond
$joinType
string
$joinType

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# removeAttributeToSelect( string $attribute = null )

Remove an attribute from selection list

Remove an attribute from selection list

Parameters

$attribute
string
$attribute

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# setPage( integer $pageNum, integer $pageSize )

Set collection page start and records to show

Set collection page start and records to show

Parameters

$pageNum
integer
$pageNum
$pageSize
integer
$pageSize

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# load( mixed $printQuery = false, mixed $logQuery = false )

Load collection data into object items

Load collection data into object items

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected Mage_Eav_Model_Entity_Collection_Abstract
# _getAllIdsSelect( mixed $limit = null, mixed $offset = null )

Clone and reset collection

Clone and reset collection

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public array
# getAllIds( mixed $limit = null, mixed $offset = null )

Retrive all ids for collection

Retrive all ids for collection

Returns

array
public array
# getAllIdsSql( )

Retrive all ids sql

Retrive all ids sql

Returns

array
public
# save( )

Save all the entities in the collection

Save all the entities in the collection

public
# delete( )

Delete all the entities in the collection

Delete all the entities in the collection

public Mage_Eav_Model_Entity_Collection_Abstract
# importFromArray( array $arr )

Import 2D array into collection as objects

Import 2D array into collection as objects

If the imported items already exist, update the data for existing objects

Parameters

$arr
array
$arr

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public array
# exportToArray( )

Get collection data as a 2D array

Get collection data as a 2D array

Returns

array
public string
# getRowIdFieldName( )

Retreive row id field name

Retreive row id field name

Returns

string
public Mage_Eav_Model_Entity_Collection_Abstract
# setRowIdFieldName( string $fieldName )

Set row id field name

Set row id field name

Parameters

$fieldName
string
$fieldName

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public Mage_Eav_Model_Entity_Collection_Abstract
# _loadEntities( mixed $printQuery = false, mixed $logQuery = false )

Load entities records into items

Load entities records into items

Returns

Mage_Eav_Model_Entity_Collection_Abstract

Throws

Exception
public Mage_Eav_Model_Entity_Collection_Abstract
# _loadAttributes( mixed $printQuery = false, mixed $logQuery = false )

Load attributes into loaded entities

Load attributes into loaded entities

Returns

Mage_Eav_Model_Entity_Collection_Abstract

Throws

Exception
protected Mage_Eav_Model_Entity_Collection_Abstract
# _getLoadAttributesSelect( string $table, mixed $attributeIds = array() )

Retrieve attributes load select

Retrieve attributes load select

Parameters

$table
string
$table
$attributeIds

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected Varien_Db_Select
# _addLoadAttributesSelectValues( Varien_Db_Select $select, string $table, string $type )

Parameters

$select
Varien_Db_Select
$select
$table
string
$table
$type
string
$type

Returns

Varien_Db_Select
protected Mage_Eav_Model_Entity_Collection_Abstract
# _setItemAttributeValue( array $valueInfo )

Initialize entity ubject property value

Initialize entity ubject property value

$valueInfo is _getLoadAttributesSelect fetch result row

Parameters

$valueInfo
array
$valueInfo

Returns

Mage_Eav_Model_Entity_Collection_Abstract

Throws

Mage_Eav_Exception
protected string
# _getAttributeTableAlias( string $attributeCode )

Get alias for attribute value table

Get alias for attribute value table

Parameters

$attributeCode
string
$attributeCode

Returns

string
protected string
# _getAttributeFieldName( string $attributeCode )

Retreive attribute field name by attribute code

Retreive attribute field name by attribute code

Parameters

$attributeCode
string
$attributeCode

Returns

string
protected Mage_Eav_Model_Entity_Collection_Abstract
# _addAttributeJoin( string $attributeCode, string $joinType = 'inner' )

Add attribute value table to the join if it wasn't added previously

Add attribute value table to the join if it wasn't added previously

Parameters

$attributeCode
string
$attributeCode
$joinType
string
$joinType inner|left

Returns

Mage_Eav_Model_Entity_Collection_Abstract

Throws

Mage_Eav_Exception
protected Mage_Eav_Model_Entity_Collection_Abstract
# _joinAttributeToSelect( string $method, object $attribute, string $tableAlias, array $condition, string $fieldCode, string $fieldAlias )

Adding join statement to collection select instance

Adding join statement to collection select instance

Parameters

$method
string
$method
$attribute
object
$attribute
$tableAlias
string
$tableAlias
$condition
array
$condition
$fieldCode
string
$fieldCode
$fieldAlias
string
$fieldAlias

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected string
# _getAttributeConditionSql( string $attribute, mixed $condition, string $joinType = 'inner' )

Get condition sql for the attribute

Get condition sql for the attribute

Parameters

$attribute
string
$attribute
$condition
mixed
$condition
$joinType
string
$joinType

Returns

string

See

self::_getConditionSql
public Mage_Eav_Model_Entity_Collection_Abstract
# setOrder( string|array $attribute, string $dir = self::SORT_ORDER_ASC )

Set sorting order

Set sorting order

$attribute can also be an array of attributes

Parameters

$attribute
string|array
$attribute
$dir
string
$dir

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public array
# toArray( array $arrAttributes = array() )

Retreive array of attributes

Retreive array of attributes

Parameters

$arrAttributes
array
$arrAttributes

Returns

array
protected Mage_Eav_Model_Entity_Collection_Abstract
# _renderOrders( )

Treat "order by" items as attributes to sort

Treat "order by" items as attributes to sort

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected Mage_Eav_Model_Entity_Collection_Abstract
# _afterLoad( )

After load method

After load method

Returns

Mage_Eav_Model_Entity_Collection_Abstract
protected Mage_Eav_Model_Entity_Collection_Abstract
# _reset( )

Reset collection

Reset collection

Returns

Mage_Eav_Model_Entity_Collection_Abstract
public
# getLoadedIds( )

Returns already loaded element ids

Returns already loaded element ids

return array

public string
# _prepareSelect( Varien_Db_Select $select )

Prepare select for load

Prepare select for load

Parameters

$select
Varien_Db_Select
$select OPTIONAL

Returns

string
Properties summary
protected array $_itemsById array()
#

Array of items with item id key

Array of items with item id key

protected array $_staticFields array()
#

Entity static fields

Entity static fields

protected Mage_Eav_Model_Entity_Abstract $_entity
#

Entity object to define collection's attributes

Entity object to define collection's attributes

protected array $_selectEntityTypes array()
#

Entity types to be fetched for objects in collection

Entity types to be fetched for objects in collection

protected array $_selectAttributes array()
#

Attributes to be fetched for objects in collection

Attributes to be fetched for objects in collection

protected array $_filterAttributes array()
#

Attributes to be filtered order sorted by

Attributes to be filtered order sorted by

protected array $_joinEntities array()
#

Joined entities

Joined entities

protected array $_joinAttributes array()
#

Joined attributes

Joined attributes

protected array $_joinFields array()
#

Joined fields data

Joined fields data

protected boolean $_useAnalyticFunction false
#

Use analytic function flag If true - allows to prepare final select with analytic functions

Use analytic function flag If true - allows to prepare final select with analytic functions

protected array $_castToIntMap array( 'validate-digits' )
#

Cast map for attribute order

Cast map for attribute order

Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0