當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilObjStyleSheet::_lookupActive方法代碼示例

本文整理匯總了PHP中ilObjStyleSheet::_lookupActive方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilObjStyleSheet::_lookupActive方法的具體用法?PHP ilObjStyleSheet::_lookupActive怎麽用?PHP ilObjStyleSheet::_lookupActive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilObjStyleSheet的用法示例。


在下文中一共展示了ilObjStyleSheet::_lookupActive方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editContentStylesObject

 /**
  * view list of styles
  */
 function editContentStylesObject()
 {
     global $rbacsystem, $ilias, $tpl, $ilToolbar, $ilCtrl, $lng;
     if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
     }
     // this may not be cool, if styles are organised as (independent) Service
     include_once "./Modules/LearningModule/classes/class.ilObjContentObject.php";
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $from_styles = $to_styles = $data = array();
     $styles = $this->object->getStyles();
     foreach ($styles as $style) {
         $style["active"] = ilObjStyleSheet::_lookupActive($style["id"]);
         $style["lm_nr"] = ilObjContentObject::_getNrOfAssignedLMs($style["id"]);
         $data[$style["title"] . ":" . $style["id"]] = $style;
         if ($style["lm_nr"] > 0) {
             $from_styles[$style["id"]] = $style["title"];
         }
         if ($style["active"] > 0) {
             $to_styles[$style["id"]] = $style["title"];
         }
     }
     // number of individual styles
     if ($fixed_style <= 0) {
         $data[-1] = array("title" => $this->lng->txt("sty_individual_styles"), "id" => 0, "lm_nr" => ilObjContentObject::_getNrLMsIndividualStyles());
         $from_styles[-1] = $this->lng->txt("sty_individual_styles");
     }
     // number of default style (fallback default style)
     if ($default_style <= 0 && $fixed_style <= 0) {
         $data[0] = array("title" => $this->lng->txt("sty_default_style"), "id" => 0, "lm_nr" => ilObjContentObject::_getNrLMsNoStyle());
         $from_styles[0] = $this->lng->txt("sty_default_style");
         $to_styles[0] = $this->lng->txt("sty_default_style");
     }
     if ($rbacsystem->checkAccess("write", $this->object->getRefId())) {
         $ilToolbar->addButton($lng->txt("sty_add_content_style"), $ilCtrl->getLinkTarget($this, "createStyle"));
         $ilToolbar->addSeparator();
         include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
         // from styles selector
         $si = new ilSelectInputGUI($lng->txt("sty_move_lm_styles") . ": " . $lng->txt("sty_from"), "from_style");
         $si->setOptions($from_styles);
         $ilToolbar->addInputItem($si, true);
         // from styles selector
         $si = new ilSelectInputGUI($lng->txt("sty_to"), "to_style");
         $si->setOptions($to_styles);
         $ilToolbar->addInputItem($si, true);
         $ilToolbar->addFormButton($lng->txt("sty_move_style"), "moveLMStyles");
         $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
     }
     include_once "./Services/Style/classes/class.ilContentStylesTableGUI.php";
     $table = new ilContentStylesTableGUI($this, "editContentStyles", $data, $this->object);
     $tpl->setContent($table->getHTML());
 }
開發者ID:khanhnnvn,項目名稱:ilias_E-learning,代碼行數:55,代碼來源:class.ilObjStyleSettingsGUI.php


注:本文中的ilObjStyleSheet::_lookupActive方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。