mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
Merge "Use local vars in LabelIconWidget"
This commit is contained in:
commit
c3a08d478a
|
@ -25,20 +25,20 @@ class LabelIconWidget extends Widget {
|
|||
public function __construct( $config ) {
|
||||
parent::__construct( $config );
|
||||
|
||||
$this->tableRow = new Tag( 'div' );
|
||||
$this->tableRow->setAttributes( [
|
||||
$tableRow = new Tag( 'div' );
|
||||
$tableRow->setAttributes( [
|
||||
'class' => 'oo-ui-labelIconWidget-row',
|
||||
] );
|
||||
|
||||
$this->icon = new Tag( 'div' );
|
||||
$this->label = new Tag( 'div' );
|
||||
$icon = new Tag( 'div' );
|
||||
$label = new Tag( 'div' );
|
||||
|
||||
$this->initializeIconElement( array_merge( $config, [ 'iconElement' => $this->icon ] ) );
|
||||
$this->initializeLabelElement( array_merge( $config, [ 'labelElement' => $this->label ] ) );
|
||||
$this->initializeIconElement( array_merge( $config, [ 'iconElement' => $icon ] ) );
|
||||
$this->initializeLabelElement( array_merge( $config, [ 'labelElement' => $label ] ) );
|
||||
$this->initializeTitledElement( $config );
|
||||
|
||||
$this->addClasses( [ 'oo-ui-labelIconWidget' ] );
|
||||
$this->tableRow->appendContent( $this->icon, $this->label );
|
||||
$this->appendContent( $this->tableRow );
|
||||
$tableRow->appendContent( $icon, $label );
|
||||
$this->appendContent( $tableRow );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue