Problem/Motivation
After we do #2334229: Move controller render array -> HtmlFragment conversion to a View listener; eliminate HtmlPageController, there will be little reason to keep Form detection pre-controller. However, since _form specifies a class, not a callable, we can't do it quite the same way.
Proposed resolution
* Modify ContentFormControllerSubscriber to look for either a _form key, or a _controller that specifies a class that implements FormInterface.
* In either case, wrap the form object in a callable much as happens now with FormController/FormPageController/EntityFormController, but not one that relies on HtmlPageController. Instead allow the form to return a render array as appropriate.
Remaining tasks
Do it.
User interface changes
None.
API changes
Note that I am marking this as for 8.1.x because I think it's likely we won't get to it until then, but it will be legal to do so as there will be no change to supported API behavior.
There is no API break from this issue, just an API addition and deprecation. _controller will be able to specify a form object, but existing _form routes will still work.
Comments
Comment #1
wim leersDuplicate of #2092647: Consolidate _form, _controller, _entity_form, etc. into just _controller?, where a broader discussion is being held.