*/ class Mage_XmlConnect_Model_Resource_Template_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract { /** * Internal constructor * * @return null */ protected function _construct() { $this->_init('xmlconnect/template'); } /** * Initialize collection select * * @return Mage_XmlConnect_Model_Resource_Template_Collection */ protected function _initSelect() { parent::_initSelect(); $this->_joinApplicationName(); return $this; } /** * Join Application Name to collection * * @return Mage_XmlConnect_Model_Resource_Template_Collection */ protected function _joinApplicationName() { $this->getSelect()->joinLeft( array('app' => $this->getTable('xmlconnect/application')), 'app.application_id = main_table.application_id', array('app_name' => 'app.name', 'app_code' => 'app.code') ); return $this; } }