summaryrefslogtreecommitdiff
path: root/vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php')
-rw-r--r--vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php b/vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php
new file mode 100644
index 00000000..d4acb216
--- /dev/null
+++ b/vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace OOUI;
+
+/**
+ * HorizontalLayout arranges its contents in a single line (using `display: inline-block` for its
+ * items), with small margins between them.
+ */
+class HorizontalLayout extends Layout {
+ /**
+ * @param array $config Configuration options
+ * @param Widget[]|Layout[] $config['items'] Widgets or other layouts to add to the layout.
+ */
+ public function __construct( array $config = array() ) {
+ // Parent constructor
+ parent::__construct( $config );
+
+ // Mixins
+ $this->mixin( new GroupElement( $this, array_merge( $config, array( 'group' => $this ) ) ) );
+
+ // Initialization
+ $this->addClasses( array( 'oo-ui-horizontalLayout' ) );
+ if ( isset( $config['items'] ) ) {
+ $this->addItems( $config['items'] );
+ }
+ }
+}