當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Component::list_drop方法代碼示例

本文整理匯總了PHP中Component::list_drop方法的典型用法代碼示例。如果您正苦於以下問題:PHP Component::list_drop方法的具體用法?PHP Component::list_drop怎麽用?PHP Component::list_drop使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Component的用法示例。


在下文中一共展示了Component::list_drop方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: edit

 function edit()
 {
     $this->breadcrumb->append_crumb('Home', base_url());
     $this->breadcrumb->append_crumb('Staff Detail', base_url() . 'index.php/staffs/show/' . $this->staff_id);
     $this->breadcrumb->append_crumb('Edit Salary Component', base_url() . '');
     $salary_component = new Salary_Component();
     $rs = $salary_component->where('gaji_id', $this->id)->get();
     $data['id'] = $rs->gaji_id;
     // Component
     $component = new Component();
     $components = $component->list_drop();
     $comp_selected = $rs->gaji_component_id;
     $data['gaji_component_id'] = form_dropdown('gaji_component_id', $components, $comp_selected, 'id="gaji_component_id"');
     $data['gaji_daily_value'] = array('name' => 'gaji_daily_value', 'id' => 'gaji_daily_value', 'value' => $rs->gaji_daily_value);
     $data['gaji_amount_value'] = array('name' => 'gaji_amount_value', 'gaji_amount_value' => 'gaji_amount_value', 'value' => $rs->gaji_amount_value);
     $data['btn_save'] = array('name' => 'btn_save', 'value' => 'Update', 'class' => 'btn btn-primary');
     $data['title'] = 'Update';
     $data['form_action'] = site_url('staffs/' . $this->staff_id . '/salary_components/update');
     $data['link_back'] = anchor('staffs/' . $this->staff_id . '/salary_components/index', 'Back');
     $data['breadcrumb'] = $this->breadcrumb->output();
     $this->load->view('staff_salary_components/frm_salary_component', $data);
 }
開發者ID:anggadjava,項目名稱:payroll,代碼行數:22,代碼來源:salary_components.php

示例2: edit

 function edit()
 {
     $sub_salary = new Sub_Salary();
     $rs = $sub_salary->where('sub_id', $this->sub_id)->get();
     $data['id'] = $this->sub_id;
     // Component
     $component = new Component();
     $components = $component->list_drop();
     $comp_selected = $rs->salary_component_id;
     $data['salary_component_id'] = form_dropdown('salary_component_id', $components, $comp_selected, 'id="salary_component_id"');
     $data['salary_periode'] = array('name' => 'salary_periode', 'value' => $rs->salary_periode);
     $data['salary_daily_value'] = array('name' => 'salary_daily_value', 'value' => $rs->salary_daily_value, 'id' => 'salary_daily_value');
     $data['salary_amount_value'] = array('name' => 'salary_amount_value', 'value' => $rs->salary_amount_value, 'id' => 'salary_amount_value');
     $data['btn_save'] = array('name' => 'btn_save', 'value' => 'Update', 'class' => 'btn btn-primary');
     $data['title'] = 'Update';
     $data['form_action'] = site_url('salaries/' . $this->salary_id . '/sub_salaries/update');
     $data['link_back'] = anchor('salaries/' . $this->salary_id . '/sub_salaries/index', 'Back', array('class' => 'btn'));
     $this->load->view('sub_salaries/frm_sub_salaries', $data);
 }
開發者ID:anggadjava,項目名稱:payroll,代碼行數:19,代碼來源:sub_salaries.php


注:本文中的Component::list_drop方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。