+ return new HTMLFormFieldLayout( $inputField, $config );
+ }
+
+ /**
+ * Whether the field should be automatically infused. Note that all OOjs UI HTMLForm fields are
+ * infusable (you can call OO.ui.infuse() on them), but not all are infused by default, since
+ * there is no benefit in doing it e.g. for buttons and it's a small performance hit on page load.
+ *
+ * @return bool
+ */
+ protected function shouldInfuseOOUI() {
+ // Always infuse fields with help text, since the interface for it is nicer with JS
+ return $this->getHelpText() !== null;
+ }
+
+ /**
+ * Get the list of extra ResourceLoader modules which must be loaded client-side before it's
+ * possible to infuse this field's OOjs UI widget.
+ *
+ * @return string[]
+ */
+ protected function getOOUIModules() {
+ return [];