5 parent::__construct( $config );
7 $this->addClasses( [
'mw-collapsible' ] );
8 if ( isset( $config[
'collapsed' ] ) && $config[
'collapsed' ] ) {
9 $this->addClasses( [
'mw-collapsed' ] );
11 $this->header->addClasses( [
'mw-collapsible-toggle' ] );
12 $this->group->addClasses( [
'mw-collapsible-content' ] );
14 $this->header->appendContent(
15 new OOUI\IconWidget( [
17 'label' =>
wfMessage(
'collapsible-expand' )->text(),
19 new OOUI\IconWidget( [
21 'label' =>
wfMessage(
'collapsible-collapse' )->text(),
25 $this->header->setAttributes( [