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


PHP ilObjUser::_getAllUserAssignedStyles方法代码示例

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


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

示例1: getStyles

 /**
  * Get styles
  *
  * @param
  * @return
  */
 function getStyles()
 {
     global $styleDefinition;
     $all_styles = ilStyleDefinition::getAllSkinStyles();
     // get all user assigned styles
     $all_user_styles = ilObjUser::_getAllUserAssignedStyles();
     // output "other" row for all users, that are not assigned to
     // any existing style
     $users_missing_styles = 0;
     foreach ($all_user_styles as $style) {
         if (!isset($all_styles[$style])) {
             $style_arr = explode(":", $style);
             $users_missing_styles += ilObjUser::_getNumberOfUsersForStyle($style_arr[0], $style_arr[1]);
         }
     }
     if ($users_missing_styles > 0) {
         $all_styles["other"] = array("title" => $this->lng->txt("other"), "id" => "other", "template_id" => "", "style_id" => "", "template_name" => "", "style_name" => "", "users" => $users_missing_styles);
     }
     $this->setData($all_styles);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilSystemStylesTableGUI.php

示例2: testMiscellaneous

 /**
  * Miscellaneous
  * @group IL_Init
  */
 public function testMiscellaneous()
 {
     $value = "";
     include_once "./Services/User/classes/class.ilObjUser.php";
     ilObjUser::_getNumberOfUsersForStyle("default", "delos");
     ilObjUser::_getAllUserAssignedStyles();
     ilObjUser::_moveUsersToStyle("default", "delos", "default", "delos");
     $this->assertEquals("", $value);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:13,代码来源:ilObjUserTest.php

示例3: moveUserStylesObject

 /**
  * Move user styles
  *
  * @param
  * @return
  */
 function moveUserStylesObject()
 {
     global $ilCtrl, $lng;
     $to = explode(":", $_POST["to_style"]);
     if ($_POST["from_style"] != "other") {
         $from = explode(":", $_POST["from_style"]);
         ilObjUser::_moveUsersToStyle($from[0], $from[1], $to[0], $to[1]);
     } else {
         // get all user assigned styles
         $all_user_styles = ilObjUser::_getAllUserAssignedStyles();
         // move users that are not assigned to
         // currently existing style
         foreach ($all_user_styles as $style) {
             if (!in_array($style, $all_styles)) {
                 $style_arr = explode(":", $style);
                 ilObjUser::_moveUsersToStyle($style_arr[0], $style_arr[1], $to[0], $to[1]);
             }
         }
     }
     ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
     $ilCtrl->redirect($this, "editSystemStyles");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:28,代码来源:class.ilObjStyleSettingsGUI.php


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