diff options
Diffstat (limited to 'vendor/oojs/oojs-ui/php/widgets/IconWidget.php')
-rw-r--r-- | vendor/oojs/oojs-ui/php/widgets/IconWidget.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/oojs/oojs-ui/php/widgets/IconWidget.php b/vendor/oojs/oojs-ui/php/widgets/IconWidget.php new file mode 100644 index 00000000..f8273f37 --- /dev/null +++ b/vendor/oojs/oojs-ui/php/widgets/IconWidget.php @@ -0,0 +1,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' ) ); + } +} |