octobercms/october — pull request #812 by nicolas-lescop (2014-12-02 14:03:21+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);
}