当前位置: 首页>>代码示例>>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;未经允许,请勿转载。