Guest User

Untitled

a guest
Jul 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <?php
  2.  
  3. require_once APPPATH . 'controllers/app/app.php';
  4.  
  5. class Settings_neighborhoods extends App
  6. {
  7.  
  8. public function show_list ($vars)
  9. {
  10. //return a list of neighborhoods
  11. $vars = $this->getApiVars();
  12.  
  13. //step 1: look up list of neighborhoods - using helper - only select the columns you actually want - use Pager Obj
  14. $this->load->helper('neighborhoods');
  15. $pagerLayout = getNeighborhoods();
  16.  
  17. // Retrieving Doctrine_Pager instance
  18. $pager = $pagerLayout->getPager();
  19.  
  20. // Fetching communities
  21. $neighborhoods = $pager->execute();
  22.  
  23. // creating html
  24. $html_table = $this->_html($neighborhoods->toArray());
  25.  
  26. var_dump($html_table);
  27.  
  28. /*
  29. // Displaying page links
  30. // Displays: [1][2][3][4][5]
  31. // With links in all pages, except the $currentPage (our example, page 1)
  32. $pagerLayout->display();
  33.  
  34. //step 2: loop thru array and construct a big chunk of html table
  35.  
  36. $html_table = $this->_html($doctrine_result->toArray());
  37.  
  38. //step 3: formatHtml and assign to $vars['neighborhoods_html']
  39.  
  40.  
  41.  
  42. //step 4: create a view with all the necessary JS
  43. $setting_sub_section = "neighborhoods";
  44. $this->load->view('app/settings/'.$setting_sub_section.'/init', $vars);
  45. */
  46.  
  47.  
  48. }
  49.  
  50. public function add ()
  51. {
  52. //add a neighborhood
  53. }
  54.  
  55. public function edit ()
  56. {
  57. //edit a neighborhood
  58. }
  59.  
  60. public function archive()
  61. {
  62. //archive a neighborhood
  63. }
  64.  
  65. }
Add Comment
Please, Sign In to add comment