本文整理汇总了PHP中grocery_CRUD::set_crud_url_path方法的典型用法代码示例。如果您正苦于以下问题:PHP grocery_CRUD::set_crud_url_path方法的具体用法?PHP grocery_CRUD::set_crud_url_path怎么用?PHP grocery_CRUD::set_crud_url_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类grocery_CRUD
的用法示例。
在下文中一共展示了grocery_CRUD::set_crud_url_path方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$crud = new grocery_CRUD();
//Jangan lupa load library ini
$this->load->library('gc_dependent_select');
$crud->set_crud_url_path(site_url('examples/index'));
$crud->set_table('data_diri');
$crud->columns('nama', 'fk_id_prov', 'fk_id_kota', 'fk_id_kec', 'fk_id_kel');
$crud->display_as('fk_id_prov', 'Provinsi')->display_as('fk_id_kota', 'Kota')->display_as('fk_id_kec', 'Kecamatan')->display_as('fk_id_kel', 'Kelurahan');
$crud->set_subject('Data Diri');
$crud->set_relation('fk_id_prov', 'provinsi', 'nama');
$crud->set_relation('fk_id_kota', 'kabupaten', 'nama');
$crud->set_relation('fk_id_kec', 'kecamatan', 'nama');
$crud->set_relation('fk_id_kel', 'kelurahan', 'nama');
$fields = array('fk_id_prov' => array('table_name' => 'provinsi', 'title' => 'nama', 'relate' => null, 'data-placeholder' => 'Pilih Provinsi'), 'fk_id_kota' => array('table_name' => 'kabupaten', 'title' => 'nama', 'id_field' => 'id_kab', 'relate' => 'id_prov', 'data-placeholder' => 'Pilih Kota'), 'fk_id_kec' => array('table_name' => 'kecamatan', 'title' => 'ID: {id_kec} / Kota : {nama}', 'id_field' => 'id_kec', 'relate' => 'id_kab', 'data-placeholder' => 'Pilih Kecamatan'), 'fk_id_kel' => array('table_name' => 'kelurahan', 'title' => 'nama', 'id_field' => 'id_kel', 'relate' => 'id_kec', 'data-placeholder' => 'Pilih Kelurahan'));
$config = array('main_table' => 'data_diri', 'main_table_primary' => 'id', "url" => site_url() . '/examples/index/', 'ajax_loader' => base_url() . 'assets/ajax-loader.gif');
$categories = new gc_dependent_select($crud, $fields, $config);
// first method:
//$output = $categories->render();
// the second method:
$js = $categories->get_js();
$output = $crud->render();
$output->output .= $js;
$this->_example_output($output);
}
示例2: index
public function index()
{
$crud = new grocery_CRUD();
$crud->set_crud_url_path(site_url('Barcode/index'));
$crud->set_table('data');
//Nama Tabel
$crud->set_subject('Barcode');
$crud->unset_read();
$crud->unset_export();
$crud->unset_print();
$crud->add_action('Generate Barcode', '', '', 'barcode-icon', array($this, 'ca_barcode'));
//Custom Action
$output = $crud->render();
//Config Halaman
$output->judul_besar = 'Barcode';
$output->judul_kecil = 'Generate Barcode';
$output->m_barcode = TRUE;
$this->_example_output($output);
}
示例3: customers_management2
public function customers_management2()
{
$crud = new grocery_CRUD();
$crud->set_table('customers');
$crud->columns('customerName', 'contactLastName', 'phone', 'city', 'country', 'salesRepEmployeeNumber', 'creditLimit');
$crud->display_as('salesRepEmployeeNumber', 'from Employeer')->display_as('customerName', 'Name')->display_as('contactLastName', 'Last Name');
$crud->set_subject('Customer');
$crud->set_relation('salesRepEmployeeNumber', 'employees', 'lastName');
$crud->set_crud_url_path(site_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), site_url(strtolower(__CLASS__ . "/multigrids")));
$output = $crud->render();
if ($crud->getState() != 'list') {
$this->_example_output($output);
} else {
return $output;
}
}
示例4: KLUI
public function KLUI($jenis)
{
$crud = new grocery_CRUD();
$crud->set_table('klui');
$crud->columns('kbli', 'kegiatan_pokok');
$crud->display_as('kbli', 'KBLI');
$crud->display_as('kegiatan_pokok', 'Kegiatan Pokok');
$crud->add_action('Pilih', '', 'klui', 'sk-icon');
$crud->unset_export();
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();
$crud->unset_print();
$crud->unset_read();
$crud->set_crud_url_path(site_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), site_url(strtolower(__CLASS__ . "/" . $jenis)));
$output = $crud->render();
return $output;
}
示例5: vperusahaan
public function vperusahaan($jenis)
{
$crud = new grocery_CRUD();
$crud->set_table('vperusahaan');
$crud->columns('npwp', 'nama', 'alamat');
$crud->set_primary_key('id', 'vperusahaan');
$crud->display_as('npwp', 'NPWP Perusahaan');
$crud->display_as('nama', 'Nama Perusahaan');
$crud->add_action('Pilih', '', 'perus', 'sk-icon');
$crud->unset_export();
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();
$crud->unset_print();
$crud->unset_read();
$crud->set_crud_url_path(site_url(strtolower(__CLASS__ . "/" . __FUNCTION__)), site_url(strtolower(__CLASS__ . "/" . $jenis)));
$output = $crud->render();
return $output;
}