Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once APPPATH . 'controllers/app/app.php';
- class Settings_neighborhoods extends App
- {
- public function show_list ($vars)
- {
- //return a list of neighborhoods
- $vars = $this->getApiVars();
- //step 1: look up list of neighborhoods - using helper - only select the columns you actually want - use Pager Obj
- $this->load->helper('neighborhoods');
- $pagerLayout = getNeighborhoods();
- // Retrieving Doctrine_Pager instance
- $pager = $pagerLayout->getPager();
- // Fetching communities
- $neighborhoods = $pager->execute();
- // creating html
- $html_table = $this->_html($neighborhoods->toArray());
- var_dump($html_table);
- /*
- // Displaying page links
- // Displays: [1][2][3][4][5]
- // With links in all pages, except the $currentPage (our example, page 1)
- $pagerLayout->display();
- //step 2: loop thru array and construct a big chunk of html table
- $html_table = $this->_html($doctrine_result->toArray());
- //step 3: formatHtml and assign to $vars['neighborhoods_html']
- //step 4: create a view with all the necessary JS
- $setting_sub_section = "neighborhoods";
- $this->load->view('app/settings/'.$setting_sub_section.'/init', $vars);
- */
- }
- public function add ()
- {
- //add a neighborhood
- }
- public function edit ()
- {
- //edit a neighborhood
- }
- public function archive()
- {
- //archive a neighborhood
- }
- }
Add Comment
Please, Sign In to add comment