本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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()));
}
示例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();
}
示例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();
}