octobercms/october — pull request #579 by Flynsarmy (2014-08-22 05:12:29+00:00)
Title: Refs #485, #504 - Allow adding nested FileUpload files

With a YAML field of `defaultOptions[images]` the new `getColumn()` method returns `$this->model->defaultOptions->images()` as expected. Works infinitely deep.

* This PR is backwards compatible.
* PR #578 is required for adding to work correctly.
* This PR only allows adding of images. There's still more work to be done. Namely:
* Removing images still doesn't work. Results in a JS error due to `$this->getEventHandler('onRemoveAttachment')` returning *formDefaultOptions[images]::onRemoveAttachment*. I'll need to fix in another PR.
* Saving forms with nested FileUpload fields fails due to SQL error *SQLSTATE[42S22]: Column not found: 1054 Unknown column 'defaultOptions[images]' in 'field list'*