当前位置: 首页>>代码示例>>PHP>>正文


PHP ilAdvancedSelectionListGUI::setStyle方法代码示例

本文整理汇总了PHP中ilAdvancedSelectionListGUI::setStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP ilAdvancedSelectionListGUI::setStyle方法的具体用法?PHP ilAdvancedSelectionListGUI::setStyle怎么用?PHP ilAdvancedSelectionListGUI::setStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilAdvancedSelectionListGUI的用法示例。


在下文中一共展示了ilAdvancedSelectionListGUI::setStyle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fillDataSection

 /**
  * Fill data section
  */
 function fillDataSection()
 {
     global $ilCtrl, $lng, $ilAccess;
     $tpl = new ilTemplate("tpl.wiki_side_block_content.html", true, true, "Modules/Wiki");
     $wp = $this->getPageObject();
     // info
     $actions[] = array("txt" => $lng->txt("info_short"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "infoScreen"));
     // recent changes
     $actions[] = array("txt" => $lng->txt("wiki_recent_changes"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "recentChanges"));
     foreach ($actions as $a) {
         $tpl->setCurrentBlock("action");
         $tpl->setVariable("HREF", $a["href"]);
         $tpl->setVariable("TXT", $a["txt"]);
         $tpl->parseCurrentBlock();
         $tpl->touchBlock("item");
     }
     $actions = array();
     // all pages
     $actions[] = array("txt" => $lng->txt("wiki_all_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "allPages"));
     // new pages
     $actions[] = array("txt" => $lng->txt("wiki_new_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "newPages"));
     // popular pages
     $actions[] = array("txt" => $lng->txt("wiki_popular_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "popularPages"));
     // orphaned pages
     $actions[] = array("txt" => $lng->txt("wiki_orphaned_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "orphanedPages"));
     // page lists
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $list = new ilAdvancedSelectionListGUI();
     $list->setListTitle($lng->txt("wiki_page_lists"));
     $list->setStyle(ilAdvancedSelectionListGUI::STYLE_LINK);
     $list->setId("wiki_pglists");
     foreach ($actions as $a) {
         $list->addItem($a["txt"], "", $a["href"]);
     }
     $tpl->setCurrentBlock("plain");
     $tpl->setVariable("PLAIN", $list->getHTML());
     $tpl->parseCurrentBlock();
     $tpl->touchBlock("item");
     // page actions
     $list = new ilAdvancedSelectionListGUI();
     $list->setStyle(ilAdvancedSelectionListGUI::STYLE_LINK);
     $list->setListTitle($lng->txt("wiki_page_actions"));
     $list->setId("wiki_pgactions");
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         // rating
         if (ilObjWiki::_lookupRating($this->getPageObject()->getWikiId())) {
             if (!$this->getPageObject()->getRating()) {
                 $list->addItem($lng->txt("wiki_activate_page_rating"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "activateWikiPageRating"));
             } else {
                 $list->addItem($lng->txt("wiki_deactivate_page_rating"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "deactivateWikiPageRating"));
             }
         }
         // unhide advmd?
         include_once "./Modules/Wiki/classes/class.ilWikiAdvMetaDataBlockGUI.php";
         if (ilWikiAdvMetaDataBlockGUI::isActive($this->getPageObject()->getWikiId()) && ilWikiPage::lookupAdvancedMetadataHidden($this->getPageObject()->getId())) {
             $list->addItem($lng->txt("wiki_unhide_meta_adv_records"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "unhideAdvancedMetaData"));
         }
     }
     if ($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked() || $ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         // rename
         $list->addItem($lng->txt("wiki_rename_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "renameWikiPage"));
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         // block/unblock
         if ($this->getPageObject()->getBlocked()) {
             $list->addItem($lng->txt("wiki_unblock_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "unblockWikiPage"));
         } else {
             $list->addItem($lng->txt("wiki_block_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "blockWikiPage"));
         }
         // delete page
         $st_page = ilObjWiki::_lookupStartPage($this->getPageObject()->getParentId());
         if ($st_page != $this->getPageObject()->getTitle()) {
             $list->addItem($lng->txt("wiki_delete_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "deleteWikiPageConfirmationScreen"));
         }
         include_once "Modules/Wiki/classes/class.ilWikiPageTemplate.php";
         $wpt = new ilWikiPageTemplate($this->getPageObject()->getParentId());
         if (!$wpt->isPageTemplate($this->getPageObject()->getId())) {
             $list->addItem($lng->txt("wiki_add_template"), "", $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "addPageTemplateFromPageAction"));
         } else {
             $list->addItem($lng->txt("wiki_remove_template_status"), "", $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "removePageTemplateFromPageAction"));
         }
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]) || $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $tpl->setCurrentBlock("plain");
         $tpl->setVariable("PLAIN", $list->getHTML());
         $tpl->parseCurrentBlock();
         $tpl->touchBlock("item");
     }
     // permissions
     //		if ($ilAccess->checkAccess('edit_permission', "", $_GET["ref_id"]))
     //		{
     //			$actions[] = array(
     //				"txt" => $lng->txt("perm_settings"),
     //				"href" => $ilCtrl->getLinkTargetByClass(array("ilobjwikigui", "ilpermissiongui"), "perm")
     //				);
     //		}
     $actions = array();
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilWikiFunctionsBlockGUI.php

示例2: 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>');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:36,代码来源:class.ilObjectAddNewItemGUI.php

示例3: fillFooter


//.........这里部分代码省略.........
             $this->tpl->setCurrentBlock("template_editor_delete");
             $this->tpl->setVariable("TEMPLATE_DELETE_ID", $delete_id);
             $this->tpl->setVariable("TXT_TEMPLATE_DELETE", $lng->txt("tbl_template_delete"));
             $this->tpl->setVariable("TXT_TEMPLATE_DELETE_SUBMIT", $lng->txt("delete"));
             $this->tpl->setVariable("TEMPLATE_DELETE_CMD", $this->parent_cmd);
             $this->tpl->parseCurrentBlock();
         }
         // form to save new template
         $overlay = new ilOverlayGUI($create_id);
         $overlay->setTrigger($list_id . "_create");
         $overlay->setAnchor("ilAdvSelListAnchorElement_" . $list_id);
         $overlay->setAutoHide(false);
         $overlay->add();
         $this->tpl->setCurrentBlock("template_editor");
         $this->tpl->setVariable("TEMPLATE_CREATE_ID", $create_id);
         $this->tpl->setVariable("TXT_TEMPLATE_CREATE", $lng->txt("tbl_template_create"));
         $this->tpl->setVariable("TXT_TEMPLATE_CREATE_SUBMIT", $lng->txt("save"));
         $this->tpl->setVariable("TEMPLATE_CREATE_CMD", $this->parent_cmd);
         $this->tpl->parseCurrentBlock();
         // load saved template
         include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
         $alist = new ilAdvancedSelectionListGUI();
         $alist->setId($list_id);
         $alist->addItem($lng->txt("tbl_template_create"), "create", "#");
         if (sizeof($templates)) {
             $alist->addItem($lng->txt("tbl_template_delete"), "delete", "#");
             foreach ($templates as $name) {
                 $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_tpl", urlencode($name));
                 $alist->addItem($name, $name, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
                 $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_tpl", "");
             }
         }
         $alist->setListTitle($lng->txt("tbl_templates"));
         $alist->setStyle(ilAdvancedSelectionListGUI::STYLE_LINK_BUTTON);
         $this->tpl->setVariable("TEMPLATE_SELECTOR", "&nbsp;" . $alist->getHTML());
     }
     if ($footer) {
         $this->tpl->setCurrentBlock("tbl_footer");
         $this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount());
         if ($this->getDisplayAsBlock()) {
             $this->tpl->setVariable("BLK_CLASS", "Block");
         }
         $this->tpl->parseCurrentBlock();
         // top navigation, if number info or linkbar given
         if ($numinfo != "" || $linkbar != "" || $column_selector != "" || count($this->filters) > 0 || count($this->optional_filters) > 0) {
             if (is_object($ilUser) && (count($this->filters) || count($this->optional_filters))) {
                 $this->tpl->setCurrentBlock("filter_activation");
                 $this->tpl->setVariable("TXT_ACTIVATE_FILTER", $lng->txt("show_filter"));
                 $this->tpl->setVariable("FILA_ID", $this->getId());
                 if ($this->getId() != "") {
                     $this->tpl->setVariable("SAVE_URLA", "./ilias.php?baseClass=ilTablePropertiesStorage&table_id=" . $this->getId() . "&cmd=showFilter&user_id=" . $ilUser->getId());
                 }
                 $this->tpl->parseCurrentBlock();
                 if (!$this->getDisableFilterHiding()) {
                     $this->tpl->setCurrentBlock("filter_deactivation");
                     $this->tpl->setVariable("TXT_HIDE", $lng->txt("hide_filter"));
                     if ($this->getId() != "") {
                         $this->tpl->setVariable("SAVE_URL", "./ilias.php?baseClass=ilTablePropertiesStorage&table_id=" . $this->getId() . "&cmd=hideFilter&user_id=" . $ilUser->getId());
                         $this->tpl->setVariable("FILD_ID", $this->getId());
                     }
                     $this->tpl->parseCurrentBlock();
                 }
             }
             if ($numinfo != "" && $this->getEnableNumInfo()) {
                 $this->tpl->setCurrentBlock("top_numinfo");
                 $this->tpl->setVariable("NUMINFO", $numinfo);
开发者ID:bheyser,项目名称:qplskl,代码行数:67,代码来源:class.ilTable2GUI.php

示例4: 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());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilCloudPluginInitGUI.php

示例5: fillHeaderCommands

 /**
  * Fill header commands block
  */
 function fillHeaderCommands()
 {
     global $lng, $ilCtrl;
     // header commands
     if (count($this->getHeaderCommands()) > 0 || $this->detail_max > $this->detail_min && $this->detail_min == 0 || $this->close_command != "") {
         foreach ($this->getHeaderCommands() as $command) {
             $this->tpl->setCurrentBlock("header_command");
             $this->tpl->setVariable("HREF_HCOMM", $command["href"]);
             $this->tpl->setVariable("TXT_HCOMM", $command["text"]);
             $this->tpl->parseCurrentBlock();
         }
         // close button
         if ($this->detail_max > $this->detail_min && $this->detail_min == 0 && !$this->getRepositoryMode() || $this->close_command != "") {
             $alt = $lng->txt("hide");
             if ($this->close_command != "") {
                 $url = $this->close_command;
             } else {
                 $ilCtrl->setParameterByClass("ilcolumngui", $this->getDetailParameter(), "0");
                 $url = $ilCtrl->getLinkTargetByClass("ilcolumngui", "");
                 $ilCtrl->setParameterByClass("ilcolumngui", $this->getDetailParameter(), "");
             }
             $this->dropdown[] = array("text" => $alt, "image" => $img, "href" => $url);
         }
         $this->tpl->setCurrentBlock("header_commands");
         $this->tpl->parseCurrentBlock();
     }
     // adv selection gui
     include_once "Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $dropdown = new ilAdvancedSelectionListGUI();
     $dropdown->setUseImages(true);
     $dropdown->setStyle(ilAdvancedSelectionListGUI::STYLE_LINK_BUTTON);
     $dropdown->setHeaderIcon(ilAdvancedSelectionListGUI::ICON_CONFIG);
     $dropdown->setId("block_dd_" . $this->getBlockType() . "_" . $this->block_id);
     foreach ($this->dropdown as $item) {
         if ($item["href"] || $item["onclick"]) {
             if ($item["checked"]) {
                 $item["image"] = ilUtil::getImagePath("icon_checked.svg");
             }
             $dropdown->addItem($item["text"], "", $item["href"], $item["image"], $item["text"], "", "", false, $item["onclick"]);
         }
     }
     $dropdown = $dropdown->getHTML();
     $this->tpl->setCurrentBlock("header_dropdown");
     $this->tpl->setVariable("ADV_DROPDOWN", $dropdown);
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("hitem");
     $this->tpl->parseCurrentBlock();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:51,代码来源:class.ilBlockGUI.php


注:本文中的ilAdvancedSelectionListGUI::setStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。