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


PHP Evaluation::find方法代码示例

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


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

示例1: destroy

 public function destroy($id)
 {
     $evaluation = Evaluation::find($id);
     $evaluation->delete();
     Session::flash('message', 'Successfully deleted the Evaluations!');
     return Redirect::to('evaluations');
 }
开发者ID:GenteRH,项目名称:Prova-Gente-Teste,代码行数:7,代码来源:EvaluationController.php

示例2: assignEvaluationAction

 public function assignEvaluationAction()
 {
     $id = $this->getSanParam('id');
     $this->view->assign('id', $id);
     $evaluation = new Evaluation();
     $rows = $evaluation->find($id);
     $row = $rows->current();
     $this->view->assign('evaluation', $row);
     // restricted access?? only show trainings we have the ACL to view
     require_once 'views/helpers/TrainingViewHelper.php';
     $orgWhere = '';
     $org_allowed_ids = allowed_organizer_access($this);
     if ($org_allowed_ids) {
         // doesnt have acl 'training_organizer_option_all'
         $org_allowed_ids = implode(',', $org_allowed_ids);
         $orgWhere = " training_organizer_option_id in ({$org_allowed_ids}) ";
     }
     // restricted access?? only show organizers that belong to this site if its a multi org site
     $site_orgs = allowed_organizer_in_this_site($this);
     // for sites to host multiple training organizers on one domain
     $allowedWhereClause .= $site_orgs ? " AND training_organizer_option_id in ({$site_orgs}) " : "";
     require_once 'models/table/Training.php';
     $tableObj = new Training();
     $trainings = $tableObj->getTrainings($orgWhere);
     $assigned = $evaluation->fetchAssignments($id);
     foreach ($trainings as $k => $r) {
         $trainings[$k]['input_checkbox'] = '<input type="checkbox" name="training_ids[]" value="' . $r['training_id'] . '" ' . (array_search($r['training_id'], $assigned) !== false ? ' checked="checked" ' : '') . ' >';
     }
     $this->view->assign('trainings', $trainings);
     $request = $this->getRequest();
     if ($request->isPost()) {
         $status = ValidationContainer::instance();
         $training_ids = $this->getSanParam('training_ids');
         $adjusted = array();
         foreach ($training_ids as $tr) {
             $adjusted[$tr] = $tr;
         }
         require_once 'models/table/MultiOptionList.php';
         MultiOptionList::updateOptions('evaluation_to_training', 'training', 'evaluation_id', $id, 'training_id', $adjusted);
         $_SESSION['status'] = t('The') . ' ' . t('Trainings') . ' ' . t('have been assigned.');
         $status->setStatusMessage(t('The') . ' ' . t('Trainings') . ' ' . t('have been assigned.'));
         $status->setRedirect('/evaluation/browse');
         $this->sendData($status);
     }
 }
开发者ID:falafflepotatoe,项目名称:trainsmart-code,代码行数:45,代码来源:EvaluationController.php

示例3: edit

 public function edit($id)
 {
     $evaluation = Evaluation::find($id);
     return View::make('evaluations.edit', compact('evaluation'));
 }
开发者ID:lucaskillo,项目名称:Prova-Gente-Teste,代码行数:5,代码来源:EvaluationController.php


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