function display($tpl = null) { $this->state = $this->get('State'); $from_date = $this->state->get('filter.from_date'); if (empty($from_date)) { $this->state->set('filter.from_date', JHtml::date('now', 'Y-m-d')); } $to_date = $this->state->get('filter.to_date'); if (empty($to_date)) { $this->state->set('filter.to_date', JHtml::date('now', 'Y-m-d')); } $order_status = $this->state->get('filter.order_status'); $this->state->set('filter.order_status', 'CONFIRMED'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $model = new BookProModelTransports(); $this->airport = $model->getGroupAirportList(); $this->dest_list = $model->dest_list; $this->route_list = $model->getRouteList(); $this->total_order = $this->get('TotalBooking'); $this->total_pass = $this->get('Total'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Set the toolbar $this->addToolBar(); // Display the template parent::display($tpl); }
public function display($tpl = null) { $this->item = $this->get('Item'); $this->form = $this->get('Form'); $model = new BookProModelTransports(); $this->dest = $model->getGroupAirportList(); if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
function display($tpl = null) { /* @var $mainframe JApplication */ $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $models = new BookProModelTransports(); $this->dest = $models->getGroupAirportList(); $model = $this->getModel(); $this->stops = $model->getStop($this->item->id); // debug($this->dest); $this->addToolbar(); parent::display($tpl); }