當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Authentication::getLoggedUser方法代碼示例

本文整理匯總了PHP中Authentication::getLoggedUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP Authentication::getLoggedUser方法的具體用法?PHP Authentication::getLoggedUser怎麽用?PHP Authentication::getLoggedUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Authentication的用法示例。


在下文中一共展示了Authentication::getLoggedUser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

    function render()
    {
        $estimate = $this->object->tracking()->getEstimate();
        if ($estimate instanceof Estimate) {
            $estimate_value = $estimate->getValue();
            $estimate_autogenerated = $this->object->tracking()->isEstimateAutogenerated();
        } else {
            $estimate_value = 0;
            $estimate_autogenerated = false;
        }
        // if
        $settings = array('value' => $estimate_value, 'summed_time' => $this->object->tracking()->sumTime(Authentication::getLoggedUser()), 'estimate_autogenerated' => $estimate_autogenerated, 'short_format' => true, 'can_change' => $this->object->tracking()->canEstimate(Authentication::getLoggedUser()), 'estimates_url' => $this->object->tracking()->getEstimatesUrl(), 'set_estimate_url' => $this->object->tracking()->getSetEstimateUrl(), 'object_id' => $this->object->getId());
        return '(function (field, object, client_interface) {
					App.Inspector.Properties.MilestoneEstimation.apply(field, [object, ' . JSON::encode($settings) . ']);
				})';
    }
開發者ID:NaszvadiG,項目名稱:ACModules,代碼行數:16,代碼來源:MilestoneEstimateInspectorProperty.class.php

示例2: describeForApi

 /**
  * Return array or property => value pairs that describes this object
  *
  * @param IUser $user
  * @param boolean $detailed
  * @return array
  */
 function describeForApi(IUser $user, $detailed = false)
 {
     $mil_t = new Milestone($this->getId());
     $result = $mil_t->describeForApi($user, $detailed, $for_interface);
     // In this exact order, it's important!
     $result = array_merge(parent::describeForApi($user, $detailed, $for_interface), $result);
     $result['id'] = $this->getId();
     if ($detailed) {
         $result['custom_percent_complete'] = $this->getPercentsDone(false);
         $result['remaining_time'] = $this->getRemainingTime();
         $result['summed_time'] = $this->tracking()->sumTime(Authentication::getLoggedUser());
     }
     return $result;
 }
開發者ID:NaszvadiG,項目名稱:ACModules,代碼行數:21,代碼來源:RemediaMilestone.class.php


注:本文中的Authentication::getLoggedUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。