contao/core — pull request #6085 by DyaGa (2013-08-20 18:11:53+00:00)
Title: Check for `options_callback` first and then for `foreignKey` in `DC_Table::filterMenu()` method

In case when I need to customize filter menu output I have to use `options_callback`. But it doesn't work when `foreighKey` is set. Because while generating filter menu it first checks for `foreignKey` and then for `options_callback`.

As a little example. I have a table with field `pid`. Where `pid` is an id from `tl_member` table.

```php
'pid' => array
(
...
'exclude' => true,
'inputType' => 'input',
'filter' => true,
'options_callback' => array('tl_mytable', 'getMembersList'),
'eval' => array('mandatory'=>true, 'rgxp'=>'digit', 'nospace'=>true, 'readonly'=>true),
'foreignKey' => 'tl_member.username',
'sql' => "int(10) unsigned NOT NULL default '0'",
'relation' => array('type'=>'belongsTo', 'load'=>'lazy')
),
```

If not to use `options_callback` it generates a filter menu for `pid` field as list of usernames:

```
j.smith
d.evans
...
```

But I need to output it as:

```
John Smith [j.smith]
Donna Evans [d.evans]
...
```

And for doing this I'm using `options_callback`.