false, 'padded' => false, 'expanded' => true, 'framed' => false, ), $config ); // Parent constructor parent::__construct( $config ); // Initialization $this->addClasses( array( 'oo-ui-panelLayout' ) ); if ( $config['scrollable'] ) { $this->addClasses( array( 'oo-ui-panelLayout-scrollable' ) ); } if ( $config['padded'] ) { $this->addClasses( array( 'oo-ui-panelLayout-padded' ) ); } if ( $config['expanded'] ) { $this->addClasses( array( 'oo-ui-panelLayout-expanded' ) ); } if ( $config['framed'] ) { $this->addClasses( array( 'oo-ui-panelLayout-framed' ) ); } } public function getConfig( &$config ) { if ( $this->hasClass( 'oo-ui-panelLayout-scrollable' ) ) { $config['scrollable'] = true; } if ( $this->hasClass( 'oo-ui-panelLayout-padded' ) ) { $config['padded'] = true; } if ( !$this->hasClass( 'oo-ui-panelLayout-expanded' ) ) { $config['expanded'] = false; } if ( $this->hasClass( 'oo-ui-panelLayout-framed' ) ) { $config['framed'] = true; } $config['content'] = $this->content; return parent::getConfig( $config ); } }