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


PHP Employee::list_item方法代码示例

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


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

示例1: postGeneral

 public function postGeneral($id)
 {
     $id = Crypt::decrypt($id);
     $request = RRequest::find($id);
     if (Input::has('save')) {
         if (Input::get('employee') == 0 || Input::get('organization') == 0 || Input::get('r_plan') == 0 || Input::get('specialist') == 0 || strlen(Input::get('title')) < 2 || strlen(Input::get('description')) < 2) {
             Session::flash('sms_warn', trans('sta.require_field'));
         } else {
             $request->request_by_id = Input::get('employee');
             $request->for_organization_id = Input::get('organization');
             $request->for_planning_id = Input::get('r_plan');
             $request->to_department_id = Input::get('specialist');
             $request->request_title = Input::get('title');
             $request->description = Input::get('description');
             $request->request_date = date('Y-m-d');
             $request->created_by = Auth::user()->employee_id;
             if ($request->save()) {
                 Session::flash('sms_success', trans('sta.save_data_success'));
                 //return Redirect::to('branch_request/general/' . Crypt::encrypt($request->id));
             }
         }
     }
     $organizations = $this->array_list(Organization::list_item());
     $employees = $this->array_list(Employee::list_item());
     $department = $this->array_list(Department::list_item());
     $r_plans = $this->array_list(Rplan::list_item());
     return View::make('branch_request.edit_general', array('id' => $id, 'organizations' => $organizations, 'employees' => $employees, 'specialist' => $department, 'r_plans' => $r_plans, 'request' => $request));
 }
开发者ID:ravysin,项目名称:testgithub,代码行数:28,代码来源:BranchRequestController.php

示例2: postNew

 public function postNew()
 {
     $employee = $this->array_list(Employee::list_item());
     $user_roll = $this->array_list(UserRoll::list_item());
     if (strlen(Input::get('user_name')) < 4) {
         Session::flash('sms_warn', trans('sta.user_min_5'));
     } elseif (strlen(Input::get('password')) < 4) {
         Session::flash('sms_warn', trans('sta.password_min_5'));
     } elseif (Input::get('password') != Input::get('confirm')) {
         Session::flash('sms_warn', trans('sta.password_confirm_invalid'));
     } elseif (Input::get('employee') <= 0) {
         Session::flash('sms_warn', trans('sta.user_need_employee'));
     } elseif (input::get('user_roll') <= 0) {
         Session::flash('sms_warn', trans('sta.user_need_user_roll'));
     } elseif ($this->is_employee_exist(Input::get('employee'))) {
         Session::flash('sms_warn', trans('sta.employee_already_in_user'));
     } elseif ($this->is_user_exist(Input::get('user_name'))) {
         Session::flash('sms_warn', trans('sta.user_already_exist'));
     } else {
         $user = new User();
         $user->user = Input::get('user_name');
         $user->password = Hash::make(Input::get('password'));
         $user->employee_id = Input::get('employee');
         $user->user_roll_id = Input::get('user_roll');
         $user->created_by = Auth::user()->id;
         $user->save();
         $manage_organize = new ManageOrganization();
         $manage_organize->user_id = $user->id;
         $manage_organize->organization_id = Auth::user()->employee->organization_id;
         $manage_organize->created_by = Auth::user()->id;
         $manage_organize->save();
         return Redirect::to('user/edit/' . Crypt::encrypt($user->id));
     }
     return View::make('user.new', array('employee' => $employee, 'user_roll' => $user_roll));
 }
开发者ID:ravysin,项目名称:testgithub,代码行数:35,代码来源:UserController.php

示例3: getNew

 public function getNew()
 {
     $employees = $this->array_list(Employee::list_item());
     return View::make('request_staff.new', array('employees' => $employees));
 }
开发者ID:ravysin,项目名称:testgithub,代码行数:5,代码来源:StaffRequestController.php


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