/** * Display the view */ public function display($tpl = null) { $config = JComponentHelper::getParams('com_bookpro'); $this->seats_available = $config->get('seats_available', 0); $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); BookProHelper::setTitleForm($this->item, "Tour"); JToolbarHelper::title($this->item->id ? JText::_('COM_BOOKPRO_EDIT_TOUR') : JText::_('COM_BOOKPRO_NEW_TOUR')); parent::display($tpl); }