+ $legacyCheckboxes = [];
+ if ( !$this->isNew ) {
+ $legacyCheckboxes['minor'] = '';
+ }
+ $legacyCheckboxes['watch'] = '';
+ // Copy new-style checkboxes into an old-style structure
+ foreach ( $checkboxes as $name => $oouiLayout ) {
+ $legacyCheckboxes[$name] = (string)$oouiLayout;
+ }
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $ep = $this;
+ Hooks::run( 'EditPageBeforeEditChecks', [ &$ep, &$legacyCheckboxes, &$tabindex ], '1.29' );
+ // Copy back any additional old-style checkboxes into the new-style structure