/**
  * Retrieve inactive page item ids
  *
  * @access protecte
  * @param Ibrams_CmsExtended_Model_Resource_Page_Collection $collection
  * @return array
  * @author Ultimate Module Creator
  */
 protected function _getInactiveItemIds($collection)
 {
     $filter = $collection->getAllIdsSql();
     $table = Mage::getSingleton('core/resource')->getTable('ibrams_cmsextended/page');
     $bind = array('cond' => 0);
     $select = $this->_conn->select()->from(array('d' => $table), array('d.entity_id'))->where('d.entity_id IN (?)', new Zend_Db_Expr($filter))->where('status = :cond');
     return $this->_conn->fetchCol($select, $bind);
 }
 /**
  * Add attribute to filter
  *
  * @access public
  * @param Mage_Eav_Model_Entity_Attribute_Abstract|string $attribute
  * @param array $condition
  * @param string $joinType
  * @return Ibrams_CmsExtended_Model_Resource_Page_Comment_Page_Collection
  * @author Ultimate Module Creator
  */
 public function addFieldToFilter($attribute, $condition = null, $joinType = 'inner')
 {
     switch ($attribute) {
         case 'ct.comment_id':
         case 'ct.created_at':
         case 'ct.status':
         case 'ct.title':
         case 'ct.name':
         case 'ct.email':
         case 'ct.comment':
         case 'ct.updated_at':
             $conditionSql = $this->_getConditionSql($attribute, $condition);
             $this->getSelect()->where($conditionSql);
             break;
         case 'stores':
             $this->setStoreFilter($condition);
             break;
         default:
             parent::addFieldToFilter($attribute, $condition, $joinType);
             break;
     }
     return $this;
 }