All Classes Namespaces Files Functions Variables Pages
Mage_Sales_Model_Resource_Order_Status_Collection Class Reference
Inheritance diagram for Mage_Sales_Model_Resource_Order_Status_Collection:
Mage_Core_Model_Resource_Db_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection Mage_Sales_Model_Mysql4_Order_Status_Collection

Public Member Functions

 toOptionArray ()
 
 toOptionHash ()
 
 joinStates ()
 
 addStateFilter ($state)
 
 orderByLabel ($dir= 'ASC')
 
- Public Member Functions inherited from Mage_Core_Model_Resource_Db_Collection_Abstract
 __construct ($resource=null)
 
 getMainTable ()
 
 setMainTable ($table)
 
 getSelect ()
 
 addFieldToSelect ($field, $alias=null)
 
 addExpressionFieldToSelect ($alias, $expression, $fields)
 
 removeFieldFromSelect ($field, $isAlias=false)
 
 removeAllFieldsFromSelect ()
 
 setModel ($model)
 
 getModelName ($args=array())
 
 setResourceModel ($model)
 
 getResourceModelName ()
 
 getResource ()
 
 getTable ($table)
 
 getAllIds ()
 
 join ($table, $cond, $cols= '*')
 
 setResetItemsDataChanged ($flag)
 
 resetItemsDataChanged ()
 
 save ()
 
 formatDate ($date, $includeTime=true)
 
- Public Member Functions inherited from Varien_Data_Collection_Db
 __construct ($conn=null)
 
 addBindParam ($name, $value)
 
 initCache ($object, $idPrefix, $tags)
 
 getIdFieldName ()
 
 setConnection ($conn)
 
 getSelect ()
 
 getConnection ()
 
 getSize ()
 
 getSelectCountSql ()
 
 getSelectSql ($stringMode=false)
 
 setOrder ($field, $direction=self::SORT_ORDER_DESC)
 
 addOrder ($field, $direction=self::SORT_ORDER_DESC)
 
 unshiftOrder ($field, $direction=self::SORT_ORDER_DESC)
 
 addFieldToFilter ($field, $condition=null)
 
 distinct ($flag)
 
 load ($printQuery=false, $logQuery=false)
 
 fetchItem ()
 
 getData ()
 
 resetData ()
 
 loadData ($printQuery=false, $logQuery=false)
 
 printLogQuery ($printQuery=false, $logQuery=false, $sql=null)
 
 addFilterToMap ($filter, $alias, $group= 'fields')
 
- Public Member Functions inherited from Varien_Data_Collection
 __construct ()
 
 addFilter ($field, $value, $type= 'and')
 
 getFilter ($field)
 
 isLoaded ()
 
 getCurPage ($displacement=0)
 
 getLastPageNumber ()
 
 getPageSize ()
 
 getSize ()
 
 getFirstItem ()
 
 getLastItem ()
 
 getItems ()
 
 getColumnValues ($colName)
 
 getItemsByColumnValue ($column, $value)
 
 getItemByColumnValue ($column, $value)
 
 addItem (Varien_Object $item)
 
 getAllIds ()
 
 removeItemByKey ($key)
 
 clear ()
 
 walk ($callback, array $args=array())
 
 each ($obj_method, $args=array())
 
 setDataToAll ($key, $value=null)
 
 setCurPage ($page)
 
 setPageSize ($size)
 
 setOrder ($field, $direction=self::SORT_ORDER_DESC)
 
 setItemObjectClass ($className)
 
 getNewEmptyItem ()
 
 distinct ($flag)
 
 loadData ($printQuery=false, $logQuery=false)
 
 load ($printQuery=false, $logQuery=false)
 
 toXml ()
 
 toArray ($arrRequiredFields=array())
 
 toOptionArray ()
 
 toOptionHash ()
 
 getItemById ($idValue)
 
 getIterator ()
 
 count ()
 
 setCacheKey ($key)
 
 getCacheKey ()
 
 setCacheTags ($tags)
 
 getCacheTags ()
 
 getCacheLifetime ()
 
 getFlag ($flag)
 
 setFlag ($flag, $value=null)
 
 hasFlag ($flag)
 

Protected Member Functions

 _construct ()
 
- Protected Member Functions inherited from Mage_Core_Model_Resource_Db_Collection_Abstract
 _construct ()
 
 _initSelect ()
 
 _initSelectFields ()
 
 _getInitialFieldsToSelect ()
 
 _initInitialFieldsToSelect ()
 
 _init ($model, $resourceModel=null)
 
 _prepareSelect (Varien_Db_Select $select)
 
 _beforeLoad ()
 
 _afterLoad ()
 
 _canUseCache ()
 
 _loadCache ($select)
 
 _saveCache ($data, $select)
 
 _getCacheTags ()
 
- Protected Member Functions inherited from Varien_Data_Collection_Db
 _setIdFieldName ($fieldName)
 
 _getItemId (Varien_Object $item)
 
 _renderFilters ()
 
 _renderFiltersBefore ()
 
 _translateCondition ($field, $condition)
 
 _getMappedField ($field)
 
 _getMapper ()
 
 _getConditionSql ($fieldName, $condition)
 
 _getConditionFieldName ($fieldName)
 
 _renderOrders ()
 
 _renderLimit ()
 
 _beforeLoad ()
 
 _toOptionHashOptimized ($valueField='id', $labelField='name')
 
 _afterLoadData ()
 
 _afterLoad ()
 
 _reset ()
 
 _fetchAll ($select)
 
 _loadCache ($select)
 
 _saveCache ($data, $select)
 
 _canUseCache ()
 
 _getSelectCacheId ($select)
 
 _getCacheInstance ()
 
 _getCacheTags ()
 
- Protected Member Functions inherited from Varien_Data_Collection
 _setIsLoaded ($flag=true)
 
 _addItem ($item)
 
 _getItemId (Varien_Object $item)
 
 _renderFilters ()
 
 _renderOrders ()
 
 _renderLimit ()
 
 _toOptionArray ($valueField='id', $labelField='name', $additional=array())
 
 _toOptionHash ($valueField='id', $labelField='name')
 

Additional Inherited Members

- Public Attributes inherited from Mage_Core_Model_Resource_Db_Collection_Abstract
const CACHE_TAG = 'COLLECTION_DATA'
 
- Protected Attributes inherited from Mage_Core_Model_Resource_Db_Collection_Abstract
 $_model
 
 $_resourceModel
 
 $_resource
 
 $_fieldsToSelect = null
 
 $_initialFieldsToSelect = null
 
 $_fieldsToSelectChanged = false
 
 $_joinedTables = array()
 
 $_mainTable = null
 
 $_resetItemsDataChanged = false
 
 $_eventPrefix = ''
 
 $_eventObject = ''
 
 $_useAnalyticFunction = false
 

Detailed Description

Definition at line 34 of file Collection.php.

Member Function Documentation

_construct ( )
protected

Internal constructor

Definition at line 39 of file Collection.php.

References Mage_Core_Model_Resource_Db_Collection_Abstract\_init().

{
$this->_init('sales/order_status');
}
addStateFilter (   $state)

add state code filter to collection

Parameters
string$state

Definition at line 86 of file Collection.php.

References Mage_Core_Model_Resource_Db_Collection_Abstract\getSelect(), and joinStates().

{
$this->joinStates();
$this->getSelect()->where('state_table.state=?', $state);
return $this;
}
joinStates ( )

Join order states table

Definition at line 67 of file Collection.php.

References array, Varien_Data_Collection\getFlag(), Mage_Core_Model_Resource_Db_Collection_Abstract\getSelect(), Mage_Core_Model_Resource_Db_Collection_Abstract\getTable(), and Varien_Data_Collection\setFlag().

{
if (!$this->getFlag('states_joined')) {
$this->_idFieldName = 'status_state';
$this->getSelect()->joinLeft(
array('state_table' => $this->getTable('sales/order_status_state')),
'main_table.status=state_table.status',
array('state', 'is_default')
);
$this->setFlag('states_joined', true);
}
return $this;
}
orderByLabel (   $dir = 'ASC')

Define label order

Parameters
string$dir
Returns
Mage_Sales_Model_Mysql4_Order_Status_Collection

Definition at line 99 of file Collection.php.

References Mage_Core_Model_Resource_Db_Collection_Abstract\getSelect().

{
$this->getSelect()->order('main_table.label '.$dir);
return $this;
}
toOptionArray ( )

Get collection data as options array

Returns
array

Definition at line 49 of file Collection.php.

References Varien_Data_Collection\_toOptionArray().

{
return $this->_toOptionArray('status', 'label');
}
toOptionHash ( )

Get collection data as options hash

Returns
array

Definition at line 59 of file Collection.php.

References Varien_Data_Collection\_toOptionHash().

{
return $this->_toOptionHash('status', 'label');
}

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