Search/Find Job(s), based on different query criteria passed in.

@param SearchJobsParameters $parameters

@return array
@throws SmartlingApiException
964194
public function searchJobs(SearchJobsParameters $parameters)
    {
        $requestData = $this->getDefaultRequestData('json', $parameters->exportToArray());
        return $this->sendRequest('jobs/search', $requestData, self::HTTP_METHOD_POST);
    }
561988
public function search($params)
    {
        $query = Comment::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort' => [
                'defaultOrder' => [
                    'created_at' => SORT_DESC,
                    'id' => SORT_ASC,
                ]
            ],
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'user_id' => $this->user_id,
            'model_id' => $this->model_id,
            //'model_class' => $this->model_class,
            'parent' => $this->parent,
            'status' => $this->status,
        ]);

        if ($this->created_at !== null) {
            $date = strtotime($this->created_at);
            $query->andWhere(['between', 'created_at', $date, $date + 3600 * 24]);
        }

        $query->andFilterWhere(['like', 'content', $this->content]);

        return $dataProvider;
    }
112973
protected function getParameters($criteria, array $parameters) {
    $result = [];
    // flatten conditions
    $criteriaFlat = [];
    foreach ($criteria as $key => $curCriteria) {
      foreach ($curCriteria as $criterion) {
        if ($criterion instanceof Criteria) {
          $mapper = self::getMapper($criterion->getType());
          $valueName = $criterion->getAttribute();
          $attributeDesc = $mapper->getAttribute($valueName);
          if ($attributeDesc) {
            $criteriaFlat[] = $criterion;
          }
        }
      }
    }
    // get parameters in order
    $criteriaValuePosition = [];
    foreach ($parameters as $placeholder => $index) {
      $value = $criteriaFlat[$index]->getValue();
      if (is_array($value)) {
        // criteria has array value
        // initialize position counting for this criteria (defined by index)
        if (!isset($criteriaValuePosition[$index])) {
          $criteriaValuePosition[$index] = 0;
        }
        // set the value from the array
        $result[$placeholder] = $value[$criteriaValuePosition[$index]];
        $criteriaValuePosition[$index]++;
      }
      else {
        // criteria has single value
        $result[$placeholder] = $value;
      }
    }
    return $result;
  }
926791
public function search($parameters = [])
    {
        $parameters = array_merge([
            'term' => $this->defaultTerm,
            'location' => $this->defaultLocation,
            'limit' => $this->searchLimit
        ], $parameters);

        $path = $this->appendParametersToUrl('/v2/search', $parameters);
        $request = $this->getRequest('GET', $path);

        return $this->processRequest($request);
    }
717189
public function search($params)
    {
        $models = [];
        $included = !($this->load($params) && $this->validate() && trim($this->name) !== '');
        foreach (UserRBACHelper::getAuthManager()->getRules() as $name => $item) {
            if ($name != RouteRule::RULE_NAME && ($included || stripos($item->name, $this->name) !== false)) {
                $models[$name] = new AdminBizRule($item);
            }
        }

        return new ArrayDataProvider([
            'allModels' => $models,
        ]);
    }
718238
public function fetchPairs($query, array $parameters = array())
    {
        $parameters = $this->parameterTransformer->transform($parameters);
        return $this->db->fetchPairs($query, $parameters);
    }
5136
public function createJob(CreateJobParameters $parameters)
    {
        $requestData = $this->getDefaultRequestData('json', $parameters->exportToArray());
        return $this->sendRequest('jobs', $requestData, self::HTTP_METHOD_POST);
    }
1275112
public function search($params)
    {
        $query = QueueManager::find()->orderBy('id desc');

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'ttr' => $this->ttr,
            'delay' => $this->delay,
            'priority' => $this->priority,
            'result_id' => $this->result_id,
//            'created_at' => $this->created_at,
//            'updated_at' => $this->updated_at,
            'start_execute' => $this->start_execute,
            'end_execute' => $this->end_execute,
        ]);

        $this->dayCondition($query, 'created_at');
        $this->dayCondition($query, 'updated_at');

        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'sender', $this->sender])
            ->andFilterWhere(['like', 'status', $this->status])
            ->andFilterWhere(['like', 'class', $this->class])
            ->andFilterWhere(['like', 'properties', $this->properties])
            ->andFilterWhere(['like', 'data', $this->data])
            ->andFilterWhere(['like', 'result', $this->result]);


        return $dataProvider;
    }
880769
public function processParameters(array $parameters, ContainerBuilder $container)
    {
        foreach ($parameters as $parameterKey => &$parameterValue) {
            if (\is_array($parameterValue)) {
                $parameterValue = $this->processParameters($parameterValue, $container);
                continue;
            }

            $resolvedValue = $this->environmentPlaceholderResolver
                ->resolveEnvironmentPlaceholders($parameterValue, $container);

            $replacementValue = $this->replacementFetcher->getReplacedValueForParameter($parameterKey, $resolvedValue);

            if (null !== $replacementValue) {
                $parameterValue = $replacementValue;
            }
        }

        return $parameters;
    }
331298
public function search($params)
    {
        $query = Order::find()->where(['not in','status', [OrderStatus::STATUS_INCOMPLETE]]);

        $query->orderBy(['status' => SORT_ASC, 'id' => SORT_DESC]);

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'user_id' => $this->user_id,
        ]);

        $query
            ->andFilterWhere(['like', 'status', $this->status])
            ->andFilterWhere(['like', 'uid', $this->uid]);
        return $dataProvider;
    }
1220823
public function search($params)
    {
        $searchResult = $this->getRequest()->request(
            'POST',
            $this->getRequestUrl('searches'),
            $this->getSearchQuery($params)
        );

        return $this->getInputsFromSearchResult($searchResult);
    }
347223
public function searchByPhone($parameters = [])
    {
        $path = $this->appendParametersToUrl('/v2/phone_search', $parameters);
        $request = $this->getRequest('GET', $path);

        return $this->processRequest($request);
    }
1077270
public function search($params)
    {
        $this->load($params);
        $query = City::find();
        $query->select(['*', 'name' => 'city_translation.name', 'language' => 'city.language_id']);

        $query->leftJoin('city_translation', 'city_translation.city_id=city.id');
        //$query->andWhere(['city.language_id' => 'city_translation.language_id']);
        //   $query->joinWith('city');
        //    $query->joinWith('city.localisedIdentification');

        if (isset($this->uid)) {
            $this->pageSize = 1;
        }

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => ($this->pagination ? [
                'pageSize' => $this->pageSize,
                    ] : FALSE),
            'sort' => [
                'attributes' => [
                    'name', 'postcode', 'language'
                ],
            ]
        ]);
        if (isset($this->uid)) {
            // uncomment the following line if you do not want to return any records when validation fails
            $query->where(['uid' => $this->uid]);
            return $dataProvider;
        }
        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            $query->where('0=1');
            return $dataProvider;
        }




        return $dataProvider;
    }
239951
public function search($params)
    {
        $query = Message::find();
        $query->joinWith('source');
        
        $dataProvider = new ActiveDataProvider(['query' => $query]);
        $dataProvider->getSort()->attributes['sourceMessage'] = [
            'asc' => ['source.message' => SORT_ASC],
            'desc' => ['source.message' => SORT_DESC],
        ];
        $dataProvider->getSort()->attributes['sourceCategory'] = [
            'asc' => ['source.category' => SORT_ASC],
            'desc' => ['source.category' => SORT_DESC],
        ];

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere(['id' => $this->id]);
        if ($this->translation) {
            $t = addslashes($this->translation);
            $query->where("translation like '%{$t}%'");
        }

        if ($this->translationUpdate === 'is null') {
            $query->where('translation is null');
        }
        if ($this->translationUpdate === 'is not null') {
            $query->where('translation is not null');
        }

        if ($this->translation) {
            $query->andWhere(['like', 'translation', '%' . $this->translation .'%', false]);
        }
        if ($this->sourceMessage) {
            $query->andFilterWhere(['like', 'source.message', $this->sourceMessage]);
        }

        if ($this->language) {
            $query->andWhere(['language' => $this->language]);
        }
        
        if ($this->sourceCategory) {
            $query->andFilterWhere(['like', 'source.category', $this->sourceCategory]);
        }
        return $dataProvider;
    }
368512
public function search($params)
    {
        $this->load($params);
        $query = Location::find();
        $query->select(['*', 'uid' => 'location.uid', 'name' => 'city_translation.name', 'language' => 'city.language_id']);
        $query->innerJoin('city', 'location.city_id=city.id');
        $query->leftJoin('city_translation', 'city_translation.city_id=city.id');
        //$query->andWhere(['city.language_id' => 'city_translation.language_id']);
        //   $query->joinWith('city');
        //    $query->joinWith('city.localisedIdentification');

        if (isset($this->uid)) {
            $this->pageSize = 1;
        }

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => ($this->pagination ? [
                'pageSize' => $this->pageSize,
                    ] : FALSE),
            'sort' => [
                'attributes' => [
                    'name', 'postcode', 'language'
                ],
            ]
        ]);
        if (isset($this->uid)) {
            // uncomment the following line if you do not want to return any records when validation fails
            $query->where(['location.uid' => $this->uid]);
            return $dataProvider;
        }
        if (!$this->validate() || !isset($this->country_id)) {
            // uncomment the following line if you do not want to return any records when validation fails
            $query->where('0=1');
            return $dataProvider;
        }
        $query->andFilterWhere(['country_id' => $this->country_id]);
        $query->andFilterWhere(
                ['NOT IN', 'postcode', ['-1', '0']]
        );
        $query->andFilterWhere([
            'or',
            ['like', 'postcode', $this->q],
            ['like', 'city_translation.name', $this->q],
        ]);



        return $dataProvider;
    }
327367
protected function _params_filter($parameters = array()){
    $params = array();
    foreach($parameters as $key => $val) {
        if ($key == "Signature" ||$val === "" || $val === NULL){
          continue;
        } else {
          $params[$key] = $parameters[$key];
        }
    }
    ksort($params);
    reset($params);
    return $params;
  }
1220760
public function search($params)
    {
        $query = SeoReplacement::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
        ]);

        $query->andFilterWhere(['like', 'from', $this->from])
            ->andFilterWhere(['like', 'to', $this->to]);

        return $dataProvider;
    }