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


PHP ilFormat::_getSizeMagnitude方法代码示例

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


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

示例1: readRoleProperties

 /**
  * Read role properties and write them to form
  * @return 
  * @param object $role
  */
 protected function readRoleProperties(ilObjRole $role)
 {
     global $rbacreview;
     include_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
     $data['title'] = $role->getTitle();
     $data['desc'] = $role->getDescription();
     $data['reg'] = $role->getAllowRegister();
     $data['la'] = $role->getAssignUsersStatus();
     if (ilDiskQuotaActivationChecker::_isActive()) {
         $data['disk_quota'] = $role->getDiskQuota() / pow(ilFormat::_getSizeMagnitude(), 2);
     }
     if (ilDiskQuotaActivationChecker::_isPersonalWorkspaceActive()) {
         $data['wsp_disk_quota'] = $role->getPersonalWorkspaceDiskQuota() / pow(ilFormat::_getSizeMagnitude(), 2);
     }
     $data['pro'] = $rbacreview->isProtected($this->rolf_ref_id, $role->getId());
     $this->form->setValuesByArray($data);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:22,代码来源:class.ilObjRoleGUI.php

示例2: getValues

 /**
  * Get values from user object and put them into form
  */
 function getValues()
 {
     global $ilUser, $ilSetting;
     $data = array();
     // login data
     $data["auth_mode"] = $this->object->getAuthMode();
     $data["login"] = $this->object->getLogin();
     //$data["passwd"] = "********";
     //$data["passwd2"] = "********";
     $data["ext_account"] = $this->object->getExternalAccount();
     // system information
     require_once './Services/Utilities/classes/class.ilFormat.php';
     $data["create_date"] = ilFormat::formatDate($this->object->getCreateDate(), 'datetime', true);
     $data["owner"] = ilObjUser::_lookupLogin($this->object->getOwner());
     $data["approve_date"] = $this->object->getApproveDate() != "" ? ilFormat::formatDate($this->object->getApproveDate(), 'datetime', true) : null;
     $data["agree_date"] = $this->object->getAgreeDate() != "" ? ilFormat::formatDate($this->object->getAgreeDate(), 'datetime', true) : null;
     $data["last_login"] = $this->object->getLastLogin() != "" ? ilFormat::formatDate($this->object->getLastLogin(), 'datetime', true) : null;
     $data["active"] = $this->object->getActive();
     $data["time_limit_unlimited"] = $this->object->getTimeLimitUnlimited();
     $from = new ilDateTime($this->object->getTimeLimitFrom() ? $this->object->getTimeLimitFrom() : time(), IL_CAL_UNIX);
     $data["time_limit_from"]["date"] = $from->get(IL_CAL_FKT_DATE, 'Y-m-d', $ilUser->getTimeZone());
     $data["time_limit_from"]["time"] = $from->get(IL_CAL_FKT_DATE, 'H:i:s', $ilUser->getTimeZone());
     $until = new ilDateTime($this->object->getTimeLimitUntil() ? $this->object->getTimeLimitUntil() : time(), IL_CAL_UNIX);
     $data['time_limit_until']['date'] = $until->get(IL_CAL_FKT_DATE, 'Y-m-d', $ilUser->getTimeZone());
     $data['time_limit_until']['time'] = $until->get(IL_CAL_FKT_DATE, 'H:i:s', $ilUser->getTimeZone());
     // BEGIN DiskQuota, Show disk space used
     require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
     if (ilDiskQuotaActivationChecker::_isActive()) {
         $data["disk_quota"] = $this->object->getDiskQuota() / ilFormat::_getSizeMagnitude() / ilFormat::_getSizeMagnitude();
     }
     if (ilDiskQuotaActivationChecker::_isPersonalWorkspaceActive()) {
         $data["wsp_disk_quota"] = $this->object->getPersonalWorkspaceDiskQuota() / ilFormat::_getSizeMagnitude() / ilFormat::_getSizeMagnitude();
     }
     // W. Randelshofer 2008-09-09: Deactivated display of disk space usage,
     // because determining the disk space usage may take several minutes.
     /*
     require_once "Modules/File/classes/class.ilObjFileAccess.php";
     require_once "Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php";
     require_once "Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php";
     require_once "Services/Mail/classes/class.ilObjMailAccess.php";
     require_once "Modules/Forum/classes/class.ilObjForumAccess.php";
     require_once "Modules/MediaCast/classes/class.ilObjMediaCastAccess.php";
     $data["disk_space_used"] =
     	ilObjFileAccess::_getDiskSpaceUsedBy($this->object->getId(), true).'<br>'.
     	ilObjFileBasedLMAccess::_getDiskSpaceUsedBy($this->object->getId(), true).'<br>'.
     	ilObjSAHSLearningModuleAccess::_getDiskSpaceUsedBy($this->object->getId(), true).'<br>'.
     	ilObjMailAccess::_getDiskSpaceUsedBy($this->object->getId(), true).'<br>'.
     	ilObjForumAccess::_getDiskSpaceUsedBy($this->object->getId(), true).'<br>'.
     	ilObjMediaCastAccess::_getDiskSpaceUsedBy($this->object->getId(), true).'<br>';
     */
     // END DiskQuota, Show disk space used
     // personal data
     $data["gender"] = $this->object->getGender();
     $data["firstname"] = $this->object->getFirstname();
     $data["lastname"] = $this->object->getLastname();
     $data["title"] = $this->object->getUTitle();
     $data['birthday'] = $this->object->getBirthday();
     $data["institution"] = $this->object->getInstitution();
     $data["department"] = $this->object->getDepartment();
     $data["street"] = $this->object->getStreet();
     $data["city"] = $this->object->getCity();
     $data["zipcode"] = $this->object->getZipcode();
     $data["country"] = $this->object->getCountry();
     $data["sel_country"] = $this->object->getSelectedCountry();
     $data["phone_office"] = $this->object->getPhoneOffice();
     $data["phone_home"] = $this->object->getPhoneHome();
     $data["phone_mobile"] = $this->object->getPhoneMobile();
     $data["fax"] = $this->object->getFax();
     $data["email"] = $this->object->getEmail();
     $data["hobby"] = $this->object->getHobby();
     $data["referral_comment"] = $this->object->getComment();
     // interests
     $data["interests_general"] = $this->object->getGeneralInterests();
     $data["interests_help_offered"] = $this->object->getOfferingHelp();
     $data["interests_help_looking"] = $this->object->getLookingForHelp();
     // instant messengers
     $data["im_icq"] = $this->object->getInstantMessengerId('icq');
     $data["im_yahoo"] = $this->object->getInstantMessengerId('yahoo');
     $data["im_msn"] = $this->object->getInstantMessengerId('msn');
     $data["im_aim"] = $this->object->getInstantMessengerId('aim');
     $data["im_skype"] = $this->object->getInstantMessengerId('skype');
     $data["im_jabber"] = $this->object->getInstantMessengerId('jabber');
     $data["im_voip"] = $this->object->getInstantMessengerId('voip');
     // other data
     $data["matriculation"] = $this->object->getMatriculation();
     $data["delicious"] = $this->object->getDelicious();
     $data["client_ip"] = $this->object->getClientIP();
     // user defined fields
     include_once './Services/User/classes/class.ilUserDefinedFields.php';
     $this->user_defined_fields = ilUserDefinedFields::_getInstance();
     $user_defined_data = $this->object->getUserDefinedData();
     foreach ($this->user_defined_fields->getDefinitions() as $field_id => $definition) {
         $data["udf_" . $field_id] = $user_defined_data["f_" . $field_id];
     }
     // settings
     $data["language"] = $this->object->getLanguage();
     $data["skin_style"] = $this->object->skin . ":" . $this->object->prefs["style"];
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjUserGUI.php


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