octobercms/october — pull request #810 by nicolas-lescop (2014-12-02 12:37:49+00:00)
Title: Extend query on relation behavior

From a relation behavior config file like this

status:
label: Status
list: @/plugins/path/to/your/relation/config/columns.yaml
emptyMessage: backend::lang.list.no_records

You can extend the list query with this method :

relationExtendQuery($query, $field, $manageMode)
{
if ($field == 'status') $query->where('thing', '=', $this->thing);
}