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


PHP Registration::has方法代碼示例

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


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

示例1: isRegistrable

 /**
  * (1) user_list 為空才開放注冊
  * (2) 注冊截止比賽結束時
  * (3) 隻能注冊一次
  */
 public function isRegistrable()
 {
     if (strlen(trim($this->getUserList())) > 0) {
         return FALSE;
     }
     if ($this->getEndDatetime()->lt(new fTimestamp())) {
         return FALSE;
     }
     if (Registration::has(fAuthorization::getUserToken(), $this->getId())) {
         return FALSE;
     }
     return TRUE;
 }
開發者ID:daerduoCarey,項目名稱:oj,代碼行數:18,代碼來源:Report.php

示例2: elseif

<?php

if (fAuthorization::checkLoggedIn() and Registration::has(fAuthorization::getUserToken(), $this->report->getId())) {
    ?>
  <button class="btn btn-mini btn-success disabled">已確認參賽</button>
<?php 
} elseif ($this->report->isRegistrable()) {
    ?>
  <form style="display:inline;margin:0" action="<?php 
    echo SITE_BASE;
    ?>
/contest/<?php 
    echo $this->report->getId();
    ?>
/register" method="POST">
    <button type="submit" class="btn btn-mini btn-success">確認參賽</button>
  </form>
<?php 
}
開發者ID:daerduoCarey,項目名稱:oj,代碼行數:19,代碼來源:_register_btn.php

示例3: purchaseCost

 public function purchaseCost($id)
 {
     $registration = Registration::has('issue')->find($id);
     $earning = new Earning();
     $earning->project_id = $registration->project_id;
     $earning->location_id = $registration->location_id;
     $earning->issue_id = $registration->issue->id;
     $earning->employee_id = Auth::user()->employee_id;
     $earning->earning_date = $registration->registration_date;
     $earning->earnable_type = 'Registration';
     $earning->earnable_id = $registration->id;
     $earning->code = $this->generateEarningCode();
     $earning->signature = $this->generateEarningSignature();
     $earning->payment = $registration->registration_cost;
     $earning->save();
     $registration->cost_is_paid = 1;
     $registration->save();
     return array('code' => $earning->code);
 }
開發者ID:emanmks,項目名稱:oneschool,代碼行數:19,代碼來源:RegistrationsController.php

示例4: registrationsFilter

 public function registrationsFilter($id)
 {
     $classification_id = $id;
     $classification = Classification::find($classification_id);
     $classifications = Classification::where('category', '=', 'Registration')->get();
     $registrations = Registration::has('issue')->where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->where('classification_id', '=', $classification_id)->get();
     $menu = 'report';
     return View::make('reports.registrations', compact('classifications', 'classification', 'registrations', 'menu'));
 }
開發者ID:emanmks,項目名稱:oneschool,代碼行數:9,代碼來源:ReportsController.php


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