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


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怎麽用?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);
 }
開發者ID:heruprambadi,項目名稱:gc_depend_dropdown,代碼行數:25,代碼來源:Examples.php

示例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);
 }
開發者ID:heruprambadi,項目名稱:barcode,代碼行數:19,代碼來源:Barcode.php

示例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;
     }
 }
開發者ID:tibioltean,項目名稱:pcireg,代碼行數:16,代碼來源:~Examples.php

示例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;
 }
開發者ID:ibnoe,項目名稱:perijinanbontang,代碼行數:18,代碼來源:tdp.php

示例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;
 }
開發者ID:ibnoe,項目名稱:perijinanbontang,代碼行數:19,代碼來源:limbah.php


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