当前位置: 首页>>代码示例>>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;未经允许,请勿转载。