summaryrefslogtreecommitdiff
path: root/vendor/oojs/oojs-ui/php/widgets/IconWidget.php
blob: d752ddc8c707a91389e2bfd947f96b3849d8525c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

namespace OOUI;

/**
 * Icon widget.
 *
 * See IconElement for more information.
 */
class IconWidget extends Widget {

	/* Static Properties */

	public static $tagName = 'span';

	/**
	 * @param array $config Configuration options
	 */
	public function __construct( array $config = array() ) {
		// Parent constructor
		parent::__construct( $config );

		// Mixins
		$this->mixin( new IconElement( $this,
			array_merge( $config, array( 'iconElement' => $this ) ) ) );
		$this->mixin( new TitledElement( $this,
			array_merge( $config, array( 'titled' => $this ) ) ) );
		$this->mixin( new FlaggedElement( $this,
			array_merge( $config, array( 'flagged' => $this ) ) ) );

		// Initialization
		$this->addClasses( array( 'oo-ui-iconWidget' ) );
	}
}