OOUI\GroupElement Class Reference

Element containing a sequence of child elements. More...

Inheritance diagram for OOUI\GroupElement:
[legend]
Collaboration diagram for OOUI\GroupElement:
[legend]

## Public Member Functions

| __construct (Element $element, array $config=array())
| isEmpty ()
| Check if there are no items. More...
| getItems ()
| Get items. More...
| addItems (array $items, $index=null)
| Add items. More...
| removeItems ($items)
| Remove items. More...
| clearItems ()
| Clear all items. More...
| getConfig (&$config)
Public Member Functions inherited from OOUI\ElementMixin
| __construct (Element $element, Tag $target, array $config=array())
| Create element. More...
| getConfig (&$config)
| Add properties to the given `$config` array to allow reconstruction of this widget via its constructor. More...

## Static Public Attributes

static | $targetPropertyName = 'group'
Static Public Attributes inherited from OOUI\ElementMixin
static string | $targetPropertyName = ''
| Property name for accessing the target on the element.

## Protected Attributes

array | $items = array()
| List of items in the group as Elements.
Protected Attributes inherited from OOUI\ElementMixin
Element | $element = null
| Element being mixed into.

## Additional Inherited Members

Public Attributes inherited from OOUI\ElementMixin
Tag | $target = null
| Tag being targeted.

## Detailed Description

Element containing a sequence of child elements.

## Constructor & Destructor Documentation

OOUI\GroupElement::__construct | ( | Element | $element,
|  | array | $config = `array()`
| ) |  |

Parameters

  Element | $element | Element being mixed into
  array | $config | Configuration options

## Member Function Documentation

OOUI\GroupElement::addItems | ( | array | $items,
|  |  | $index = `null`
| ) |  |

Add items.

Adding an existing item will move it.

Parameters

  | Element[] | $items Items
  number | $index | Index to insert items at

Returns
  $this

OOUI\GroupElement::clearItems | ( |  | ) |

Clear all items.

Items will be detached, not removed, so they can be used later.

Returns
  $this

OOUI\GroupElement::getItems | ( |  | ) |

Get items.

Returns
  Element[] Items

OOUI\GroupElement::isEmpty | ( |  | ) |

Check if there are no items.

Returns
  boolean Group is empty

OOUI\GroupElement::removeItems | ( |  | $items | ) |

Remove items.

Parameters

  Element[] | $items Items to remove

Returns
  $this

The documentation for this class was generated from the following file:

- php/mixins/GroupElement.php