octobercms/october — pull request #236 by Flynsarmy (2014-05-30 23:53:10+00:00)
Title: Pass all field settings to drop down optionsMethod callback

This push allows your drop down optionsMethod to know which field it is an options method for and see all relevant field info. This commit should be backwards compatible.

This is useful, for example, when dynamically adding drop down fields to a form using a third party plugin. The field specifies `options: getPluginFieldOptions` which you can then define in your model something like so:
```php
public function getMasterFieldOptions(FormField $field)
{
$caller = new $field->attributes['data-caller'];
return $caller->getFieldOptions($field);
}
```