Search Engines - Organic Search.

This query returns site usage data for organic traffic by search engine, sorted by pageviews in descending order.

@param array $parameters Parameters you may want to overwrite.

@return array
555035
public function getSearchEngines_OrganicSearch($parameters = [], $parseResult = true)
    {
        $this->setParams([
            'metrics'    => 'ga:pageviews,ga:sessionDuration,ga:exits',
            'dimensions' => 'ga:source',
            'filters'    => 'ga:medium==organic',
            'sort'       => '-ga:pageviews',
        ]);

        return $this->execute($parameters, $parseResult);
    }
547920
public function get(array $parameters = array())
    {
        $response = $this->ontraport->get(
            $this->getNamespace(), $this->toArray($parameters)
        );

        return $this->ontraport->collection($this, $response);
    }
409289
public function count(array $parameters = [])
    {
        $this->manager->commit();
        $count = $this->applyFilters(
            $this->queryBuilder
                ->select('count(*) as count')
                ->from($this->entity->getTable(), $this->alias)
        )->query(array_merge($this->parameters, $parameters))->fetch();

        return $count['count'];
    }
840121
public function search($params)
    {
        $query = UserModel::find();
        if(array_key_exists("page", $params)&&array_key_exists("pageLimit", $params)){
            $query = $query->orderBy('id')
                    ->offset($params["page"]*$params["pageLimit"])
                    ->limit($params["pageLimit"]);
        }
        if(array_key_exists("status",$params)){
            $query->where(['status'=>$params["status"]]);
        }
        if(array_key_exists("q",$params)){
            $query->andFilterWhere(['like','username', $params["q"] ]);
        }
        $count = $query->count();
        $query=$query->all();


        return ['count'=>$count,'items'=>$query];
    }
308132
public function getSummary(array $parameters)
    {
        $this->initialize($parameters['row'], $parameters['pObj']);

        $this->addTargetPage();
        $this->addSettingFromFlexForm('Filter', 'search.query.filter');
        $this->addSettingFromFlexForm('Sorting', 'search.query.sortBy');
        $this->addSettingFromFlexForm('Results per Page', 'search.results.resultsPerPage');
        $this->addSettingFromFlexForm('Boost Function', 'search.query.boostFunction');
        $this->addSettingFromFlexForm('Boost Query', 'search.query.boostQuery');
        $this->addSettingFromFlexForm('Tie Breaker', 'search.query.tieParameter');
        $this->addSettingFromFlexForm('Template', 'view.templateFiles.results');
        return $this->render();
    }
329491
public function getBusinessesSearchResults($parameters = [])
    {
        $csvParams = ['attributes', 'categories', 'price'];

        $path = $this->appendParametersToUrl('/v3/businesses/search', $parameters, $csvParams);
        $request = $this->getRequest('GET', $path, $this->getDefaultHeaders());

        return $this->processRequest($request);
    }
1215180
public function getRelativeUrl(array $parameters = array())
    {
        $route = $this->request->attributes->get('_route');

        $parameters = array_merge($this->getParameters(), $parameters);

        return $this->router->generate($route, $parameters);
    }
686903
public static function find($parameters = null)
    {
        $results = parent::find($parameters);
        $newResult = [];

        if ($results) {
            foreach ($results as $result) {
                $customFields = $result->getAllCustomFields();
                if (is_array($customFields)) {
                    //field the object
                    foreach ($customFields as $key => $value) {
                        $result->{$key} = $value;
                    }

                    $newResult[] = $result;
                }
            }

            unset($results);
        }
        return $newResult;
    }
251349
protected function getFilterCriteria(array $parameters)
    {
        /** @var \Netgen\EzPlatformSiteApi\API\Values\Location $location */
        $location = $parameters['location'];

        $criteria = [];
        $criteria[] = new SubtreeCriterion($location->pathString);

        if ($parameters['exclude_self']) {
            $criteria[] = new LogicalNot(new LocationId($location->id));
        }

        return $criteria;
    }
1193010
public static function parseParameters(array $parameters)
    {
        //TODO: let 2nd parameter be both title, or default query parameters
        //TODO: needs some checks before determining $title
        $explodeResult    = self::explodeSortParameter($parameters[0]);
        $sortColumn       = (empty($explodeResult)) ? $parameters[0] : $explodeResult[1];
        $title            = (count($parameters) === 1) ? $sortColumn : $parameters[1];
        $queryParameters  = (isset($parameters[2]) && is_array($parameters[2])) ? $parameters[2] : [];
        $anchorAttributes = (isset($parameters[3]) && is_array($parameters[3])) ? $parameters[3] : [];

        return [$sortColumn, $parameters[0], $title, $queryParameters, $anchorAttributes];
    }
396730
public function search($params)
    {
        $query = static::find();

        $dataProvider = new ActiveDataProvider(['query' => $query]);
        $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];
        $dataProvider->pagination->pageSize = Yii::$app->session->get('per-page', 20);

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

        $query
            ->andFilterWhere(['id' => $this->id])
            ->andFilterWhere(['level' => $this->level])
            ->andFilterWhere(['model' => $this->model])
            ->andFilterWhere(['user' => $this->user])
            ->andFilterWhere(['like', 'category', $this->category])
            ->andFilterWhere(['like', 'ip', $this->ip])
            ->andFilterWhere(['like', 'message', $this->message]);

        return $dataProvider;
    }
1089080
public function search($params)
    {
        $query = PartnerRequest::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,
            'sender_id' => $this->sender_id,
            'created_at' => $this->created_at,
            'moderation_status' => $this->moderation_status,
            'moderated_by' => $this->moderated_by,
            'moderated_at' => $this->moderated_at,
        ]);

        $query->andFilterWhere(['like', 'company_name', $this->company_name])
            ->andFilterWhere(['like', 'website', $this->website])
            ->andFilterWhere(['like', 'message', $this->message]);

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

        return $dataProvider;
    }
1320261
public function getSearchEngines_PaidSearch($parameters = [], $parseResult = true)
    {
        $this->setParams([
            'metrics'    => 'ga:pageviews,ga:sessionDuration,ga:exits',
            'dimensions' => 'ga:source',
            'filters'    => 'ga:medium==cpa,ga:medium==cpc,ga:medium==cpm,ga:medium==cpp,ga:medium==cpv,ga:medium==ppc',
            'sort'       => '-ga:pageviews',
        ]);

        return $this->execute($parameters, $parseResult);
    }
241973
protected function parameterValues($parameters)
    {
        $values = array();
        foreach ($parameters as $value) {
            $values[] = is_array($value) ? $value['value'] : $value;
        }
        return $values;
    }
519651
public function search($params)
    {
        $query = Comment::find();

        $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;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'obj_id' => $this->obj_id,
            'parent' => $this->parent,
            'author' => $this->author,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            'created_by' => $this->created_by,
            'updated_by' => $this->updated_by,
        ]);

        $query->andFilterWhere(['like', 'content', $this->content])
            ->andFilterWhere(['like', 'author_name', $this->author_name])
            ->andFilterWhere(['like', 'author_email', $this->author_email])
            ->andFilterWhere(['like', 'author_url', $this->author_url])
            ->andFilterWhere(['like', 'author_ip', $this->author_ip])
            ->andFilterWhere(['like', 'status', $this->status])
            ->andFilterWhere(['like', 'type', $this->type])
            ->andFilterWhere(['like', 'obj_type', $this->obj_type]);

        return $dataProvider;
    }
824030
public function search($params)
    {
        $query = Model::find();

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

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

        $query->andFilterWhere([
            'menu_id' => $this->menuId,
        ]);

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

        return $dataProvider;
    }
630451
public static function listAllVariantsAsync(array $parameters = [])
    {
        return self::listAllVariantsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }