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


PHP ilObjRole::_lookupTitle方法代码示例

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


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

示例1: __construct

 public function __construct($parent_obj, $parent_cmd, $role_id, $template_context = "")
 {
     parent::__construct($parent_obj, $parent_cmd, $template_context);
     global $lng, $ilCtrl, $ilTabs;
     /**
      * @var $ilCtrl ilCtrl
      * @var $ilTabs ilTabsGUI
      */
     $this->ctrl = $ilCtrl;
     $this->tabs = $ilTabs;
     $this->lng = $lng;
     $this->setPrefix("sr_other_role_" . $role_id);
     $this->setFormName('sr_other_role_' . $role_id);
     $this->setId("sr_other_role_" . $role_id);
     $this->setRoleId($role_id);
     $this->setTableHeaders();
     $this->setTopCommands(true);
     $this->setEnableHeader(true);
     $this->setShowRowsSelector(true);
     $this->setShowTemplates(false);
     $this->setEnableHeader(true);
     $this->setDefaultOrderField("role");
     $this->setEnableTitle(true);
     $this->setTitle(ilObjRole::_lookupTitle($role_id));
     $this->setRowTemplate("tpl.staff_row.html", "Modules/OrgUnit");
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilOrgUnitOtherRolesTableGUI.php

示例2: getProfileAsString

 /**
  * Get formatted mail body text of user profile data.
  *
  * @param	object	  Language object (choose user language of recipient) or null to use language of current user
  */
 function getProfileAsString(&$a_language)
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     include_once './Services/Utilities/classes/class.ilFormat.php';
     global $lng, $rbacreview;
     $language =& $a_language;
     $language->loadLanguageModule('registration');
     $language->loadLanguageModule('crs');
     $body = '';
     $body .= $language->txt("login") . ": " . $this->getLogin() . "\n";
     if (strlen($this->getUTitle())) {
         $body .= $language->txt("title") . ": " . $this->getUTitle() . "\n";
     }
     if (strlen($this->getGender())) {
         $gender = $this->getGender() == 'm' ? $language->txt('gender_m') : $language->txt('gender_f');
         $body .= $language->txt("gender") . ": " . $gender . "\n";
     }
     if (strlen($this->getFirstname())) {
         $body .= $language->txt("firstname") . ": " . $this->getFirstname() . "\n";
     }
     if (strlen($this->getLastname())) {
         $body .= $language->txt("lastname") . ": " . $this->getLastname() . "\n";
     }
     if (strlen($this->getInstitution())) {
         $body .= $language->txt("institution") . ": " . $this->getInstitution() . "\n";
     }
     if (strlen($this->getDepartment())) {
         $body .= $language->txt("department") . ": " . $this->getDepartment() . "\n";
     }
     if (strlen($this->getStreet())) {
         $body .= $language->txt("street") . ": " . $this->getStreet() . "\n";
     }
     if (strlen($this->getCity())) {
         $body .= $language->txt("city") . ": " . $this->getCity() . "\n";
     }
     if (strlen($this->getZipcode())) {
         $body .= $language->txt("zipcode") . ": " . $this->getZipcode() . "\n";
     }
     if (strlen($this->getCountry())) {
         $body .= $language->txt("country") . ": " . $this->getCountry() . "\n";
     }
     if (strlen($this->getSelectedCountry())) {
         $body .= $language->txt("sel_country") . ": " . $this->getSelectedCountry() . "\n";
     }
     if (strlen($this->getPhoneOffice())) {
         $body .= $language->txt("phone_office") . ": " . $this->getPhoneOffice() . "\n";
     }
     if (strlen($this->getPhoneHome())) {
         $body .= $language->txt("phone_home") . ": " . $this->getPhoneHome() . "\n";
     }
     if (strlen($this->getPhoneMobile())) {
         $body .= $language->txt("phone_mobile") . ": " . $this->getPhoneMobile() . "\n";
     }
     if (strlen($this->getFax())) {
         $body .= $language->txt("fax") . ": " . $this->getFax() . "\n";
     }
     if (strlen($this->getEmail())) {
         $body .= $language->txt("email") . ": " . $this->getEmail() . "\n";
     }
     if (strlen($this->getHobby())) {
         $body .= $language->txt("hobby") . ": " . $this->getHobby() . "\n";
     }
     if (strlen($this->getComment())) {
         $body .= $language->txt("referral_comment") . ": " . $this->getComment() . "\n";
     }
     if (strlen($this->getMatriculation())) {
         $body .= $language->txt("matriculation") . ": " . $this->getMatriculation() . "\n";
     }
     if (strlen($this->getCreateDate())) {
         ilDatePresentation::setUseRelativeDates(false);
         ilDatePresentation::setLanguage($language);
         $date = ilDatePresentation::formatDate(new ilDateTime($this->getCreateDate(), IL_CAL_DATETIME));
         ilDatePresentation::resetToDefaults();
         $body .= $language->txt("create_date") . ": " . $date . "\n";
     }
     foreach ($rbacreview->getGlobalRoles() as $role) {
         if ($rbacreview->isAssigned($this->getId(), $role)) {
             $gr[] = ilObjRole::_lookupTitle($role);
         }
     }
     if (count($gr)) {
         $body .= $language->txt('reg_role_info') . ': ' . implode(',', $gr) . "\n";
     }
     // Time limit
     if ($this->getTimeLimitUnlimited()) {
         $body .= $language->txt('time_limit') . ": " . $language->txt('crs_unlimited') . "\n";
     } else {
         ilDatePresentation::setUseRelativeDates(false);
         ilDatePresentation::setLanguage($language);
         $period = ilDatePresentation::formatPeriod(new ilDateTime($this->getTimeLimitFrom(), IL_CAL_UNIX), new ilDateTime($this->getTimeLimitUntil(), IL_CAL_UNIX));
         ilDatePresentation::resetToDefaults();
         $start = new ilDateTime($this->getTimeLimitFrom(), IL_CAL_UNIX);
         $end = new ilDateTime($this->getTimeLimitUntil(), IL_CAL_UNIX);
         $body .= $language->txt('time_limit') . ': ' . $start->get(IL_CAL_DATETIME);
         $body .= $language->txt('time_limit') . ': ' . $end->get(IL_CAL_DATETIME);
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjUser.php

示例3: __buildRoleSelection

 function __buildRoleSelection($assignment_id)
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     global $rbacreview;
     $assignments = $this->assignments_obj->getAssignments();
     $selected = $assignment_id > 0 ? $assignments[$assignment_id]['role'] : $this->assignments_obj->getDefaultRole();
     if (!$selected) {
         $roles[0] = $this->lng->txt('please_choose');
     }
     foreach ($rbacreview->getGlobalRoles() as $role_id) {
         if ($role_id == ANONYMOUS_ROLE_ID) {
             continue;
         }
         $roles[$role_id] = ilObjRole::_lookupTitle($role_id);
     }
     if ($assignment_id > 0) {
         return ilUtil::formSelect($selected, "role[{$assignment_id}][role]", $roles, false, true);
     } else {
         return ilUtil::formSelect($selected, "default_role", $roles, false, true);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:21,代码来源:class.ilRegistrationSettingsGUI.php


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