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


PHP ilObjRole::createDefaultRole方法代碼示例

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


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

示例1: initDefaultRoles

 public function initDefaultRoles()
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_xvit_admin_' . $this->getRefId(), "Admin of vitero obj_no." . $this->getId(), 'il_xvit_admin', $this->getRefId());
     $role = ilObjRole::createDefaultRole('il_xvit_member_' . $this->getRefId(), "Member of vitero obj_no." . $this->getId(), 'il_xvit_member', $this->getRefId());
     parent::initDefaultRoles();
 }
開發者ID:leifos-gmbh,項目名稱:Vitero,代碼行數:7,代碼來源:class.ilObjVitero.php

示例2: initDefaultRoles

 function initDefaultRoles()
 {
     global $rbacadmin, $rbacreview, $ilDB;
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_crs_admin_' . $this->getRefId(), "Admin of crs obj_no." . $this->getId(), 'il_crs_admin', $this->getRefId());
     $role = ilObjRole::createDefaultRole('il_crs_tutor_' . $this->getRefId(), "Tutor of crs obj_no." . $this->getId(), 'il_crs_tutor', $this->getRefId());
     $role = ilObjRole::createDefaultRole('il_crs_member_' . $this->getRefId(), "Member of crs obj_no." . $this->getId(), 'il_crs_member', $this->getRefId());
     // Break inheritance, create local roles and initialize permission
     // settings depending on course status.
     $this->__setCourseStatus();
     return array();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:12,代碼來源:class.ilObjCourse.php

示例3: initDefaultRoles

 public function initDefaultRoles()
 {
     /**
      * @var $rbacadmin  ilRbacAdmin
      * @var $rbacreview ilRbacReview
      */
     global $rbacadmin, $rbacreview;
     include_once 'class.ilObjAdobeConnectAccess.php';
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     ilObjAdobeConnectAccess::getLocalAdminRoleTemplateId();
     ilObjAdobeConnectAccess::getLocalMemberRoleTemplateId();
     $admin_role = ilObjRole::createDefaultRole('il_xavc_admin_' . $this->getRefId(), 'Admin of Adobe Connect object with obj_no.' . $this->getId(), 'il_xavc_admin', $this->getRefId());
     $member_role = ilObjRole::createDefaultRole('il_xavc_member_' . $this->getRefId(), 'Member of Adobe Connect object with obj_no.' . $this->getId(), 'il_xavc_member', $this->getRefId());
     $ops = $rbacreview->getOperationsOfRole($member_role->getId(), 'xavc', $this->getRefId());
     // Set view permission for users
     $rbacadmin->grantPermission(self::RBAC_DEFAULT_ROLE_ID, $ops, $this->getRefId());
     // Set view permission for guests
     $rbacadmin->grantPermission(self::RBAC_GUEST_ROLE_ID, array(2), $this->getRefId());
     $roles = array($admin_role->getId(), $member_role->getId());
     return $roles ? $roles : array();
 }
開發者ID:KamuiXenom,項目名稱:ILIAS_AdobeConnectPlugin,代碼行數:21,代碼來源:class.ilObjAdobeConnect.php

示例4: initDefaultRoles

 public function initDefaultRoles()
 {
     global $rbacadmin, $rbacreview, $ilAppEventHandler;
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = new ilObjRole();
     $role->setTitle("il_orgu_employee_" . $this->getRefId());
     $role->setDescription("Emplyee of org unit obj_no." . $this->getId());
     $role->create();
     $GLOBALS['rbacadmin']->assignRoleToFolder($role->getId(), $this->getRefId(), 'y');
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role_sup = ilObjRole::createDefaultRole('il_orgu_superior_' . $this->getRefId(), "Superior of org unit obj_no." . $this->getId(), 'il_orgu_superior', $this->getRefId());
     $ilAppEventHandler->raise('Modules/OrgUnit', 'initDefaultRoles', array('object' => $this, 'obj_id' => $this->getId(), 'ref_id' => $this->getRefId(), 'role_superior_id' => $role->getId(), 'role_employee_id' => $role_sup->getId()));
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:13,代碼來源:class.ilObjOrgUnit.php

示例5: initDefaultRoles

 /**
  *
  * @global type $rbacadmin
  * @global type $rbacreview
  * @global ilDB $ilDB
  * @return type 
  */
 function initDefaultRoles()
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_chat_moderator_' . $this->getRefId(), "Moderator of chat obj_no." . $this->getId(), 'il_chat_moderator', $this->getRefId());
     return array();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:13,代碼來源:class.ilObjChatroom.php

示例6: initDefaultRoles

 /**
  * init default roles settings
  * @access	public
  * @return	array	object IDs of created local roles.
  */
 function initDefaultRoles()
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_grp_admin_' . $this->getRefId(), "Groupadmin group obj_no." . $this->getId(), 'il_grp_admin', $this->getRefId());
     $this->m_roleAdminId = $role->getId();
     $role = ilObjRole::createDefaultRole('il_grp_member_' . $this->getRefId(), "Groupmember of group obj_no." . $this->getId(), 'il_grp_member', $this->getRefId());
     $this->m_roleMemberId = $role->getId();
     return array();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:14,代碼來源:class.ilObjGroup.php


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