diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php')
-rw-r--r-- | vendor/oojs/oojs-ui/php/layouts/HorizontalLayout.php | 27 |
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'] ); + } + } +} |