6 * Layout made of a fieldset and optional legend.
8 * Just add FieldLayout items.
10 class FieldsetLayout extends Layout {
15 /* Static Properties */
17 public static $tagName = 'fieldset';
22 * @param array $config Configuration options
23 * @param FieldLayout[] $config['items'] Items to add
25 public function __construct( array $config = [] ) {
27 parent::__construct( $config );
30 $this->initializeIconElement( $config );
31 $this->initializeLabelElement( $config );
32 $this->initializeGroupElement( $config );
35 $this->header = new Tag( 'legend' );
39 ->addClasses( [ 'oo-ui-fieldsetLayout-header' ] )
40 ->appendContent( $this->icon, $this->label );
41 $this->group->addClasses( [ 'oo-ui-fieldsetLayout-group' ] );
43 ->addClasses( [ 'oo-ui-fieldsetLayout' ] )
44 ->prependContent( $this->header, $this->group );
45 if ( isset( $config['items'] ) ) {
46 $this->addItems( $config['items'] );