public function anyLanguageValues($values, $attribute = null)
    {
        /** @var \yii\db\ActiveRecord $model */
        $model = new $this->owner->modelClass();
        $languageClass = $model->getRelation($model->languageRelation)->modelClass;

        $this->owner
            ->innerJoinWith($model->languageRelation, false)
            ->andWhere([$languageClass::tableName() . '.' . ($attribute ?: $model->languageValueAttribute) => $model->filterLanguageValues($values)])
            ->addGroupBy(array_map(function ($pk) use ($model) {
                return $model->tableName() . '.' . $pk;
            }, $model->primaryKey()));

        return $this->owner;
    }
public function anyLanguageValues($values, $attribute = null)
    {
        /** @var \yii\db\ActiveRecord $model */
        $model = new $this->owner->modelClass();
        $languageClass = $model->getRelation($model->languageRelation)->modelClass;

        $this->owner
            ->innerJoinWith($model->languageRelation, false)
            ->andWhere([$languageClass::tableName() . '.' . ($attribute ?: $model->languageValueAttribute) => $model->filterLanguageValues($values)])
            ->addGroupBy(array_map(function ($pk) use ($model) {
                return $model->tableName() . '.' . $pk;
            }, $model->primaryKey()));

        return $this->owner;
    }
public function anyLanguageValues ( $ values , $ attribute = null ) { /** @var \yii\db\ActiveRecord $model */ $ model = new $ this -> owner -> modelClass ( ) ; $ languageClass = $ model -> getRelation ( $ model -> languageRelation ) -> modelClass ; $ this -> owner -> innerJoinWith ( $ model -> languageRelation , false ) -> andWhere ( [ $ languageClass :: tableName ( ) . '.' . ( $ attribute ? : $ model -> languageValueAttribute ) => $ model -> filterLanguageValues ( $ values ) ] ) -> addGroupBy ( array_map ( function ( $ pk ) use ( $ model ) { return $ model -> tableName ( ) . '.' . $ pk ; } , $ model -> primaryKey ( ) ) ) ; return $ this -> owner ; }
Gets entities by any languages.
@param string|string[] $values
@param string|null $attribute
@return \yii\db\ActiveQuery the owner
Gets entities by any languages .