本文整理汇总了PHP中ilAdvancedSelectionListGUI::setGroupedList方法的典型用法代码示例。如果您正苦于以下问题:PHP ilAdvancedSelectionListGUI::setGroupedList方法的具体用法?PHP ilAdvancedSelectionListGUI::setGroupedList怎么用?PHP ilAdvancedSelectionListGUI::setGroupedList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilAdvancedSelectionListGUI
的用法示例。
在下文中一共展示了ilAdvancedSelectionListGUI::setGroupedList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Add new item selection to current page incl. toolbar (trigger) and overlay
*/
public function render()
{
global $ilToolbar, $tpl, $lng;
if ($this->mode == ilObjectDefinition::MODE_WORKSPACE) {
if (!$this->parsePersonalWorkspace()) {
return;
}
} else {
if (!$this->parseRepository()) {
return;
}
}
$ov_id = "il_add_new_item_ov";
$ov_trigger_id = $ov_id . "_tr";
include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
$adv = new ilAdvancedSelectionListGUI();
$adv->setListTitle($lng->txt("cntr_add_new_item"));
$this->getHTML();
$adv->setGroupedList($this->gl);
$adv->setStyle(ilAdvancedSelectionListGUI::STYLE_EMPH);
$tpl->setVariable("SELECT_OBJTYPE_REPOS", $adv->getHTML());
//$ilToolbar->addDropDown($lng->txt("cntr_add_new_item"), $this->getHTML());
return;
// toolbar
include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
$button = ilLinkButton::getInstance();
$button->setId($ov_trigger_id);
$button->setCaption("cntr_add_new_item");
$button->setPrimary(true);
$ilToolbar->addButtonInstance($button);
// css?
$tpl->setVariable("SELECT_OBJTYPE_REPOS", '<div id="' . $ov_id . '" style="display:none;" class="ilOverlay">' . $this->getHTML() . '</div>');
}
示例2: addToolbar
/**
* @param $root_node
*/
public function addToolbar($root_node)
{
global $lng, $ilToolbar, $ilLog;
$create_list_gui = ilCloudConnector::getItemCreationListGUIClass($this->getService());
$list_gui_html = $create_list_gui->getGroupedListItemsHTML($this->getPermUploadItems(), $this->getPermCreateFolders());
if ($list_gui_html) {
//toolbar
$toolbar_locator = new ilLocatorGUI();
$toolbar_locator->addItem($this->getGuiClass()->object->getTitle(), ilCloudPluginFileTreeGUI::getLinkToFolder($root_node));
$ilToolbar->setId('xcld_toolbar');
$ilToolbar->addText("<div class='xcld_locator'>" . $toolbar_locator->getHtml() . "</div>");
$ilToolbar->addSeparator();
include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
$adv = new ilAdvancedSelectionListGUI();
$adv->setListTitle($lng->txt("cld_add_new_item"));
$ilCloudGroupedListGUI = $create_list_gui->getGroupedListItems($this->getPermUploadItems(), $this->getPermCreateFolders());
if ($ilCloudGroupedListGUI->hasItems()) {
$adv->setGroupedList($ilCloudGroupedListGUI);
}
$adv->setStyle(ilAdvancedSelectionListGUI::STYLE_EMPH);
$ilToolbar->addText($adv->getHTML());
}
}