本文整理匯總了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());
}
}