11 protected $hideIf =
null;
16 $this->hideIf = isset( $config[
'hideIf'] ) ? $config[
'hideIf'] :
null;
17 $this->modules = isset( $config[
'modules'] ) ? $config[
'modules'] : [];
20 if ( $this->hideIf ) {
21 $this->addClasses( [
'mw-htmlform-hide-if' ] );
23 if ( $this->modules ) {
27 $this->setAttributes( [
'data-mw-modules' => implode(
',', $this->modules ) ] );
29 $this->registerConfigCallback(
function ( &$config ) {
30 if ( $this->hideIf !==
null ) {
31 $config[
'hideIf'] = $this->hideIf;
42 parent::__construct( $fieldWidget, $config );
48 return 'mw.htmlform.FieldLayout';
55 public function __construct( $fieldWidget, $buttonWidget =
false,
array $config = [] ) {
57 parent::__construct( $fieldWidget, $buttonWidget, $config );
63 return 'mw.htmlform.ActionFieldLayout';