本文整理汇总了PHP中Department::list_item方法的典型用法代码示例。如果您正苦于以下问题:PHP Department::list_item方法的具体用法?PHP Department::list_item怎么用?PHP Department::list_item使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Department
的用法示例。
在下文中一共展示了Department::list_item方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
示例2: postIndex
public function postIndex()
{
$organize_list = $this->array_list(Organization::list_item());
$department_list = $this->array_list(Department::list_item());
$user_roll = $this->array_list(UserRoll::list_item());
$organization = Input::get('organization');
$condition = "";
if (Input::has('em_name')) {
$condition .= " and em.en like '%" . Input::get('em_name') . "%'";
}
if (Input::has('em_name_kh')) {
$condition .= " and em.kh like '%" . Input::get('em_name_kh') . "%'";
}
if (Input::has('em_id')) {
$condition .= " and em.code='" . Input::get('em_id') . "'";
}
if (Input::get('organization') > 0) {
$condition .= " and org.id=" . Input::get('organization');
}
if (Input::get('department') > 0) {
$condition .= " and de.id=" . Input::get('department');
}
if (Input::get('user_roll') > 0) {
$condition .= " and ur.id=" . Input::get('user_roll');
}
$user_list = User::user_list($condition);
return View::make('user.user', array('organize_list' => $organize_list, 'department_list' => $department_list, 'organization' => $organization, 'user_list' => $user_list, 'user_roll' => $user_roll));
}