view.html.php
55 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 services view. |
| 16 | * |
| 17 | * @since 1.0 |
| 18 | */ |
| 19 | class VikAppointmentsViewserviceslist 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 | /** |
| 32 | * Load services through the view model. |
| 33 | * |
| 34 | * @since 1.7 |
| 35 | */ |
| 36 | $model = JModelVAP::getInstance('serviceslist'); |
| 37 | |
| 38 | // prepare query filters |
| 39 | $filters = array(); |
| 40 | $filters['id_group'] = $input->getUint('service_group', null); |
| 41 | |
| 42 | // register groups and services |
| 43 | $this->groups = $model->getItems($filters); |
| 44 | |
| 45 | // fetch current menu item ID |
| 46 | $this->itemid = $input->getUint('Itemid'); |
| 47 | |
| 48 | // prepare page content |
| 49 | VikAppointments::prepareContent($this); |
| 50 | |
| 51 | // display the template |
| 52 | parent::display($tpl); |
| 53 | } |
| 54 | } |
| 55 |