本文整理汇总了PHP中ilObjRole::isAutoGenerated方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjRole::isAutoGenerated方法的具体用法?PHP ilObjRole::isAutoGenerated怎么用?PHP ilObjRole::isAutoGenerated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjRole
的用法示例。
在下文中一共展示了ilObjRole::isAutoGenerated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initFormRoleProperties
/**
* Create role prperty form
* @return
* @param int $a_mode
*/
protected function initFormRoleProperties($a_mode)
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
if ($this->creation_mode) {
$this->ctrl->setParameter($this, "new_type", 'role');
}
$this->form->setFormAction($this->ctrl->getFormAction($this));
switch ($a_mode) {
case self::MODE_GLOBAL_CREATE:
$this->form->setTitle($this->lng->txt('role_new'));
$this->form->addCommandButton('save', $this->lng->txt('role_new'));
break;
case self::MODE_GLOBAL_UPDATE:
$this->form->setTitle($this->lng->txt('role_edit'));
$this->form->addCommandButton('update', $this->lng->txt('save'));
break;
case self::MODE_LOCAL_CREATE:
case self::MODE_LOCAL_UPDATE:
}
// Fix cancel
$this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
$title = new ilTextInputGUI($this->lng->txt('title'), 'title');
if (ilObjRole::isAutoGenerated($this->object->getId())) {
$title->setDisabled(true);
}
$title->setValidationRegexp('/^(?!il_).*$/');
$title->setValidationFailureMessage($this->lng->txt('msg_role_reserved_prefix'));
$title->setSize(40);
$title->setMaxLength(70);
$title->setRequired(true);
$this->form->addItem($title);
$desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
if (ilObjRole::isAutoGenerated($this->object->getId())) {
$desc->setDisabled(true);
}
$desc->setCols(40);
$desc->setRows(3);
$this->form->addItem($desc);
if ($this->rolf_ref_id == ROLE_FOLDER_ID) {
$reg = new ilCheckboxInputGUI($this->lng->txt('allow_register'), 'reg');
$reg->setValue(1);
#$reg->setInfo($this->lng->txt('rbac_new_acc_reg_info'));
$this->form->addItem($reg);
$la = new ilCheckboxInputGUI($this->lng->txt('allow_assign_users'), 'la');
$la->setValue(1);
#$la->setInfo($this->lng->txt('rbac_local_admin_info'));
$this->form->addItem($la);
}
$pro = new ilCheckboxInputGUI($this->lng->txt('role_protect_permissions'), 'pro');
$pro->setValue(1);
#$pro->setInfo($this->lng->txt('role_protext_permission_info'));
$this->form->addItem($pro);
include_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
if (ilDiskQuotaActivationChecker::_isActive()) {
$quo = new ilNumberInputGUI($this->lng->txt('disk_quota'), 'disk_quota');
$quo->setMinValue(0);
$quo->setSize(4);
$quo->setInfo($this->lng->txt('enter_in_mb_desc') . '<br />' . $this->lng->txt('disk_quota_on_role_desc'));
$this->form->addItem($quo);
}
if (ilDiskQuotaActivationChecker::_isPersonalWorkspaceActive()) {
$this->lng->loadLanguageModule("file");
$wquo = new ilNumberInputGUI($this->lng->txt('personal_workspace_disk_quota'), 'wsp_disk_quota');
$wquo->setMinValue(0);
$wquo->setSize(4);
$wquo->setInfo($this->lng->txt('enter_in_mb_desc') . '<br />' . $this->lng->txt('disk_quota_on_role_desc'));
$this->form->addItem($wquo);
}
return true;
}