示例#1
0
 /**
  * Provide support for customer count filter
  *
  * @param string $field
  * @param mixed $condition
  *
  * @return Enterprise_CustomerSegment_Model_Resource_Segment_Collection
  */
 public function addFieldToFilter($field, $condition = null)
 {
     if ($field == 'customer_count') {
         return $this->addCustomerCountFilter($condition);
     } else {
         if ($field == $this->getResource()->getIdFieldName()) {
             $field = 'main_table.' . $field;
         }
     }
     parent::addFieldToFilter($field, $condition);
     return $this;
 }