this method returns a Propel ModelCriteria

@return \Propel\Runtime\ActiveQuery\ModelCriteria
509830
public function buildModelCriteria()
    {
        $query = new FeatureTypeQuery();

        /* manage translations */
        $this->configureI18nProcessing($query, array('TITLE', 'DESCRIPTION'));

        if (null !== $id = $this->getId()) {
            $query->filterById($id);
        }

        if (null !== $id = $this->getExcludeId()) {
            $query->filterById($id, Criteria::NOT_IN);
        }

        if (null !== $slug = $this->getSlug()) {
            $query->filterBySlug($slug);
        }

        if (null !== $featureId = $this->getFeatureId()) {
            $join = new Join();

            $join->addExplicitCondition(
                FeatureTypeTableMap::TABLE_NAME,
                'ID',
                null,
                FeatureFeatureTypeTableMap::TABLE_NAME,
                'FEATURE_TYPE_ID',
                null
            );

            $join->setJoinType(Criteria::JOIN);

            $query
                ->addJoinObject($join, 'feature_type_join')
                ->addJoinCondition(
                    'feature_type_join',
                    '`feature_feature_type`.`feature_id` IN (?)',
                    implode(',', $featureId),
                    null,
                    \PDO::PARAM_INT
                );
        }

        foreach ($this->getOrder() as $order) {
            switch ($order) {
                case "id":
                    $query->orderById();
                    break;
                case "id-reverse":
                    $query->orderById(Criteria::DESC);
                    break;
                case "slug":
                    $query->orderBySlug();
                    break;
                case "slug-reverse":
                    $query->orderBySlug(Criteria::DESC);
                    break;
            }
        }
        return $query;
    }
247753
public function queryObject()
    {
        $bindingType = $this->options['bindingType'];

        $queryObj = [];
        $queryObj['queryString'] = $this->query;
        $queryObj['allowLiterals'] = (bool) $this->options['allowLiterals'];

        $bindings = $this->mapBindings($bindingType, $this->options['bindings']);
        if (!empty($bindings)) {
            $queryObj[$this->options['bindingType']] = $bindings;
        }

        return $queryObj;
    }
756380
public function buildModelCriteria()
    {
        $query = parent::buildModelCriteria();

        if (null !== $featureTypeSlug = $this->getFeatureTypeSlug()) {
            $featureTypeSlug = array_map(function($value) {
                return "'" . addslashes($value) . "'";
            }, explode(',', $featureTypeSlug));

            $join = new Join();

            $join->addExplicitCondition(
                FeatureAvTableMap::TABLE_NAME,
                'FEATURE_ID',
                null,
                FeatureFeatureTypeTableMap::TABLE_NAME,
                'FEATURE_ID',
                null
            );

            $join2 = new Join();

            $join2->addExplicitCondition(
                FeatureFeatureTypeTableMap::TABLE_NAME,
                'FEATURE_TYPE_ID',
                null,
                FeatureTypeTableMap::TABLE_NAME,
                'ID',
                null
            );

            $join->setJoinType(Criteria::JOIN);
            $join2->setJoinType(Criteria::JOIN);

            $query
                ->addJoinObject($join, 'feature_feature_type_join')
                ->addJoinObject($join2, 'feature_type_join')
                ->addJoinCondition(
                    'feature_type_join',
                    '`feature_type`.`slug` IN ('.implode(',', $featureTypeSlug).')'
                );
        }

        if (null !== $featureTypeId = $this->getFeatureTypeId()) {
            $join = new Join();

            $join->addExplicitCondition(
                FeatureAvTableMap::TABLE_NAME,
                'FEATURE_ID',
                null,
                FeatureFeatureTypeTableMap::TABLE_NAME,
                'FEATURE_ID',
                null
            );

            $join->setJoinType(Criteria::JOIN);

            $query
                ->addJoinObject($join, 'feature_type_join')
                ->addJoinCondition(
                    'feature_type_join',
                    '`feature_feature_type`.`feature_type_id` IN (?)',
                    implode(',', $featureTypeId),
                    null,
                    \PDO::PARAM_INT
                );
        }

        return $query;
    }
537033
public static function queryMetas()
	{
		$model = new static;
		
		$conn = $model->getConnection();
		$query = new QueryBuilder(
			$conn,
			$conn->getQueryGrammar(),
			$conn->getPostProcessor()
		);
		
		$query->setModel($model);
		
		return $query;
	}
284206
public function getList()
    {
        if ($this->kind === 'collection') {
            $model_class = $this->model_class;
            return $model_class::dump($this->where, $model_class::PRIMARY_KEY);
        }
        return [$this->where];
    }
356092
public function getModel()
    {
        $namePath = $this->getModelClass();
        $model = new $namePath();

        if (!($model instanceof EntityDataModel)) {
            throw new \Exception($this->valueClass.' is not an instance of EntityModel.');
        }

        return $model;
    }
235076
protected function getModel()
    {
        $modelClass = trim($this->argument('model'));

        $modelInstance = new $modelClass;

        if (
            ! ($modelInstance instanceof Model) ||
            ! in_array(Searchable::class, class_uses_recursive($modelClass))
        ) {
            throw new InvalidArgumentException(sprintf(
                'The %s class must extend %s and use the %s trait.',
                $modelClass,
                Model::class,
                Searchable::class
            ));
        }

        return $modelInstance;
    }
983543
public function getQueryBuilder() {
        $query = $this->query;

        if ($query instanceof \Illuminate\Database\Eloquent\Builder)
        {
            $query = $query->getQuery();
        }

        return $query;
    }
29886
public function getModel()
    {
        if (!isset($this->_pk))
            throw new InvalidCallException('Invalid usage. You must call this method only if load method succeeds');

        if (isset($this->_model))
            return $this->_model;

        $class = $this->modelClass;
        return $this->_model = $class::findOne($this->_pk);
    }
985555
public function buildModelCriteria()
    {
        $query = DealerShedulesQuery::create();

        if ($id = $this->getId()) {
            $query->filterById($id);
        }

        if ($day = $this->getDay()) {
            $query->filterByDay($day);
        }

        if ($dealer_id = $this->getDealerId()) {
            $query->filterByDealerId($dealer_id);
        }

        if ($this->getDefaultPeriod()) {
            $query->filterByPeriodNull();
        } else {
            $query->filterByPeriodNotNull();
            if ($this->getHidePast()) {
                $query->filterByPeriodEnd(new \DateTime(), Criteria::GREATER_THAN);
            }
        }

        $query->filterByClosed($this->getClosed());

        foreach ($this->getOrder() as $order) {
            switch ($order) {
                case 'id':
                    $query->orderById();
                    break;
                case 'id-reverse':
                    $query->orderById(Criteria::DESC);
                    break;
                case 'day':
                    $query->orderByDay();
                    break;
                case 'day-reverse':
                    $query->orderByDay(Criteria::DESC);
                    break;
                case 'begin':
                    $query->orderByBegin();
                    break;
                case 'begin-reverse':
                    $query->orderByBegin(Criteria::DESC);
                    break;
                case 'period-begin':
                    $query->orderByPeriodBegin();
                    break;
                case 'period-begin-reverse':
                    $query->orderByPeriodBegin(Criteria::DESC);
                    break;
                default:
                    break;
            }
        }

        return $query;
    }
877844
public function buildCriteria()
    {
        $criteria = new Criteria(SmartyFilterI18nTableMap::DATABASE_NAME);

        if ($this->isColumnModified(SmartyFilterI18nTableMap::ID)) {
            $criteria->add(SmartyFilterI18nTableMap::ID, $this->id);
        }
        if ($this->isColumnModified(SmartyFilterI18nTableMap::LOCALE)) {
            $criteria->add(SmartyFilterI18nTableMap::LOCALE, $this->locale);
        }
        if ($this->isColumnModified(SmartyFilterI18nTableMap::TITLE)) {
            $criteria->add(SmartyFilterI18nTableMap::TITLE, $this->title);
        }
        if ($this->isColumnModified(SmartyFilterI18nTableMap::DESCRIPTION)) {
            $criteria->add(SmartyFilterI18nTableMap::DESCRIPTION, $this->description);
        }

        return $criteria;
    }
919522
public function buildModelCriteria()
    {
        $search = SmartyFilterQuery::create();

        /* manage translations */
        $this->configureI18nProcessing($search, array('TITLE', 'DESCRIPTION'));

        $id = $this->getId();

        if (!is_null($id)) {
            $search->filterById($id, Criteria::IN);
        }

        $type = $this->getFiltertype();

        if (!is_null($type)) {
            $search->filterByFiltertype($type, Criteria::IN);
        }


        $orders = $this->getOrder();

        foreach ($orders as $order) {
            switch ($order) {
                case "alpha":
                    $search->addAscendingOrderByColumn('i18n_TITLE');
                    break;
                case "alpha-reverse":
                    $search->addDescendingOrderByColumn('i18n_TITLE');
                    break;
                case "given_id":
                    if (null === $id) {
                        throw new \InvalidArgumentException('Given_id order cannot be set without `id` argument');
                    }
                    foreach ($id as $singleId) {
                        $givenIdMatched = 'given_id_matched_' . $singleId;
                        $search->withColumn(SmartyFilterTableMap::ID . "='$singleId'", $givenIdMatched);
                        $search->orderBy($givenIdMatched, Criteria::DESC);
                    }
                    break;
                case "random":
                    $search->clearOrderByColumns();
                    $search->addAscendingOrderByColumn('RAND()');
                    break(2);
            }
        }

        return $search;
    }
3344
public function search()
    {
        $query = static::find();
        if (Podium::getInstance()->user->isGuest) {
            $query->andWhere(['visible' => 1]);
        }
        $dataProvider = new ActiveDataProvider(['query' => $query]);
        $dataProvider->sort->defaultOrder = ['sort' => SORT_ASC, 'id' => SORT_ASC];
        return $dataProvider;
    }
755388
public function execute() {
        $modelName = $this->getCriteria()->getModelName();
        $params = $this->getCriteria()->getParams();
        if(!empty($this->getGroupBys())) {
            $params['group'] = $this->getGroupBys();
        }
        return $modelName::find($params);
    }
324323
public function getQuery()
    {
        // prevent duplicated execution
        if (null === $this->query && $this->model) {
            $this->initQuery()
                 ->applyFilters()
                 ->applySorting();

            $this->query = $this->assembler()->getQuery();
        }

        return $this->query;
    }
354887
public function roots()
	{
		return $this->model->newQuery()->whereNull( $this->model->getQualifiedParentColumnName() )->orderBy( $this->model->getQualifiedLeftColumnName() )->orderBy( $this->model->getQualifiedRightColumnName() )->orderBy( $this->model->getQualifiedKeyName() )->get();
	}
135022
public function actionIndex()
    {
        $this->getSearchCriteria();
        $this->layout = static::TABLE_LAYOUT;
        return $this->render('index', [
            'searchModel' => $this->searchModel,
            'dataProvider' => $this->dataProvider,
        ]);
    }