]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - vendor/oojs/oojs-ui/php/widgets/IndicatorWidget.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / oojs / oojs-ui / php / widgets / IndicatorWidget.php
diff --git a/vendor/oojs/oojs-ui/php/widgets/IndicatorWidget.php b/vendor/oojs/oojs-ui/php/widgets/IndicatorWidget.php
new file mode 100644 (file)
index 0000000..8f36a63
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+
+namespace OOUI;
+
+/**
+ * Indicator widget.
+ *
+ * See IndicatorElement for more information.
+ */
+class IndicatorWidget extends Widget {
+       use IndicatorElement;
+       use TitledElement;
+
+       /* Static Properties */
+
+       public static $tagName = 'span';
+
+       /**
+        * @param array $config Configuration options
+        */
+       public function __construct( array $config = [] ) {
+               // Parent constructor
+               parent::__construct( $config );
+
+               // Traits
+               $this->initializeIndicatorElement(
+                       array_merge( $config, [ 'indicatorElement' => $this ] ) );
+               $this->initializeTitledElement(
+                       array_merge( $config, [ 'titled' => $this ] ) );
+
+               // Initialization
+               $this->addClasses( [ 'oo-ui-indicatorWidget' ] );
+       }
+}