public function addAttributeToFilter($attribute, $condition = null, $joinType = 'inner') { switch ($attribute) { case 'status': $conditionSql = $this->_getConditionSql($attribute, $condition); $this->getSelect()->where($conditionSql); return $this; break; default: parent::addAttributeToFilter($attribute, $condition, $joinType); } return $this; }