Currently, the Codex implementations of each HTMLFormField subclass have a getInputHtml() method that checks whether the parent form is a CodexHTMLForm, and generates either the Codex version or the plain HTML version of the field based on that.
Instead, we should structure this more like how OOUIHTMLForm works, where there's a separate method in HTMLFormField (getInputOOUI()) that OOUIHTMLForm calls instead of getInputHtml().
- Add getInputCodex() method (or whatever we call it) to HTMLFormField, call it in CodexHTMLForm https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1008569
- Migrate existing Codex field implementations to the new method
- HTMLButtonField
- HTMLCheckField
- HTMLTextField
This new method should be properly documented and should be covered by PHPUnit tests.