4 require_once
'Services/UIComponent/SplitButton/classes/class.ilButtonToSplitButtonMenuItemAdapter.php';
5 require_once
'Services/UIComponent/SplitButton/classes/class.ilSplitButtonItemDivider.php';
6 require_once
'Services/UIComponent/SplitButton/exceptions/class.ilSplitButtonException.php';
7 require_once
"Services/UIComponent/Button/classes/class.ilButtonBase.php";
51 return new self(self::TYPE_SPLIT);
59 $this->menu_items[] = $menu_item;
67 $key = array_search($menu_item, $this->menu_items);
70 unset($this->menu_items[$key]);
79 return count($this->menu_items) > 0;
100 "Cannot set menu items, element at index '%s' is not of type 'ilSplitButtonItem'", $idx
138 $tpl =
new ilTemplate(
'tpl.split_button.html',
true,
true,
'Services/UIComponent/SplitButton');
143 "Cannot render a split button without a default button" 153 $btn_classes[] =
'btn-primary';
155 $tpl->setVariable(
'BTN_CSS_CLASS', implode(
' ', $btn_classes));
161 $tpl->setCurrentBlock(
'separator');
162 $tpl->touchBlock(
'separator');
163 $tpl->parseCurrentBlock();
167 $tpl->setCurrentBlock(
'item');
168 $tpl->setVariable(
'CONTENT', $item->getContent());
169 $tpl->parseCurrentBlock();
172 $tpl->setCurrentBlock(
'items');
173 $tpl->parseCurrentBlock();
176 $tpl->setVariable(
'TXT_TOGGLE_DROPDOWN', $this->lng->txt(
'toggle_dropdown'));
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.