예제 #1
0
파일: Purpose.php 프로젝트: nattaphat/cuse2
 /**
  * [checkPupose description]
  * @param  [type] $purpose [description]
  * @return [type]          [description]
  */
 public function checkPurpose($purpose)
 {
     $rs = Purpose::where('purp_name', '=', $purpose)->count();
     if (isset($rs)) {
         return $rs >= 1 ? false : true;
     }
 }
예제 #2
0
 public static function show()
 {
     parent::setAim('evaluate');
     parent::show();
 }
예제 #3
0
 /**
  * [policyRBACEditFrmAction Show form for edit rbac-policy]
  * @param  [integer] $id policy id
  * @return [none] redirect to view
  */
 public function policyRBACEditFrmAction($id)
 {
     $data['policy'] = Policy::find($id);
     $data['role'] = Roles::all();
     $data['data'] = Data::all();
     $data['condition'] = Condition::all();
     $data['action'] = Action::all();
     $data['purpose'] = Purpose::all();
     $data['obligation'] = Obligation::all();
     // print '<pre>';
     // print_r(self::policyRBACEditAction($id));
     // exit();
     return View::make('rbac.editrbac')->with('results', $data)->with('rbac_data', self::policyRBACEditAction($id));
 }
예제 #4
0
 /**
  * [searchAction description]
  * @param  [type] $keyword [description]
  * @return [type]          [description]
  */
 public function searchAction($keyword)
 {
     $purpose = new Purpose();
     $per_page = Config::get('nhc/site.purpose_perpage');
     $purpose_model = $purpose->getPurposeByKeywork($keyword, $per_page);
     if (Request::ajax()) {
         $html = View::make('purpose.searchpurpose')->with('paginator', $purpose_model);
         return $html;
     }
 }
예제 #5
0
 public static function show()
 {
     parent::setAim('prove');
     parent::show();
 }
예제 #6
0
 public static function show()
 {
     parent::setAim('dig');
     parent::show();
 }
예제 #7
0
 public static function setAim($aim)
 {
     self::$aim = $aim;
 }