$fieldWidget, 'buttonWidget' => $buttonWidget ] = $config; } // Parent constructor parent::__construct( $fieldWidget, $config ); // Properties $this->buttonWidget = $buttonWidget; $this->button = new Tag( 'span' ); $this->input = $this->isFieldInline() ? new Tag( 'span' ) : new Tag( 'div' ); // Initialization $this->addClasses( [ 'oo-ui-actionFieldLayout' ] ); $this->button ->addClasses( [ 'oo-ui-actionFieldLayout-button' ] ) ->appendContent( $this->buttonWidget ); $this->input ->addClasses( [ 'oo-ui-actionFieldLayout-input' ] ) ->appendContent( $this->fieldWidget ); $this->field ->clearContent() ->appendContent( $this->input, $this->button ); } /** @inheritDoc */ public function getConfig( &$config ) { $config['buttonWidget'] = $this->buttonWidget; return parent::getConfig( $config ); } }