本文整理汇总了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);
}
示例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);
}