コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function addFilter(\Magento\Framework\Api\Filter $filter)
 {
     if (isset($this->addFilterStrategies[$filter->getField()])) {
         $this->addFilterStrategies[$filter->getField()]->addFilter($this->getCollection(), $filter->getField(), [$filter->getConditionType() => $filter->getValue()]);
     } else {
         parent::addFilter($filter);
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function addFilter(\Magento\Framework\Api\Filter $filter)
 {
     $field = $filter->getField();
     if (in_array($field, ['review_id', 'created_at', 'status_id'])) {
         $filter->setField('rt.' . $field);
     }
     if (in_array($field, ['title', 'nickname', 'detail'])) {
         $filter->setField('rdt.' . $field);
     }
     if ($field === 'review_created_at') {
         $filter->setField('rt.created_at');
     }
     parent::addFilter($filter);
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function addFilter($condition, $field = null, $type = 'regular')
 {
     if (isset($this->addFilterStrategies[$field])) {
         $this->addFilterStrategies[$field]->addFilter($this->getCollection(), $field, $condition);
     } else {
         parent::addFilter($condition, $field);
     }
 }