Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose getFindByTagsCriteria method #10

Open
ashkarpetin opened this issue Jun 5, 2012 · 0 comments
Open

Expose getFindByTagsCriteria method #10

ashkarpetin opened this issue Jun 5, 2012 · 0 comments

Comments

@ashkarpetin
Copy link

In my web application i'm using CActiveDataProvider with filtering. I also wanted to filter records by tags but can't find a solution to do it with behavior out of the box. Dirrrrrty hack to show idea is:

public function getFindByTagsCriteriaExt($tags) {
        return $this->getFindByTagsCriteria($this->toTagsArray($tags));
    }

And in my controller code merge $criteria->mergeWith(Repo::model()->getFindByTagsCriteriaExt('yii, php')). The problem toTagsArray($tags) is used in taggedWith method not in getFindByTagsCriteria.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant