view.html.php
58 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package VikAppointments |
| 4 | * @subpackage core |
| 5 | * @author E4J s.r.l. |
| 6 | * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved. |
| 7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 | * @link https://vikwp.com |
| 9 | */ |
| 10 | |
| 11 | // No direct access |
| 12 | defined('ABSPATH') or die('No script kiddies please!'); |
| 13 | |
| 14 | /** |
| 15 | * VikAppointments make recurrence view. |
| 16 | * |
| 17 | * @since 1.5 |
| 18 | */ |
| 19 | class VikAppointmentsViewmakerecurrence extends JViewVAP |
| 20 | { |
| 21 | /** |
| 22 | * VikAppointments view display method. |
| 23 | * |
| 24 | * @return void |
| 25 | */ |
| 26 | function display($tpl = null) |
| 27 | { |
| 28 | $app = JFactory::getApplication(); |
| 29 | $input = $app->input; |
| 30 | |
| 31 | $this->addToolBar(); |
| 32 | |
| 33 | $ids = $input->getUint('cid', array(0)); |
| 34 | |
| 35 | VAPLoader::import('libraries.order.factory'); |
| 36 | $order = VAPOrderFactory::getAppointments($ids[0], JFactory::getLanguage()->getTag()); |
| 37 | |
| 38 | // get details of first appointment |
| 39 | $this->order = $order->appointments[0]; |
| 40 | |
| 41 | // display the template |
| 42 | parent::display($tpl); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Setting the toolbar. |
| 47 | * |
| 48 | * @return void |
| 49 | */ |
| 50 | protected function addToolBar() |
| 51 | { |
| 52 | // add menu title and some buttons to the page |
| 53 | JToolBarHelper::title(JText::translate('VAPMAINTITLEMAKERECURRENCE'), 'vikappointments'); |
| 54 | |
| 55 | JToolBarHelper::cancel('reservation.cancel'); |
| 56 | } |
| 57 | } |
| 58 |