| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package VikBooking |
| 4 |
* @subpackage com_vikbooking |
| 5 |
* @author E4J srl |
| 6 |
* @copyright Copyright (C) 2026 E4J srl. All rights reserved. |
| 7 |
* @license GNU General Public License version 2 or later; see LICENSE |
| 8 |
* @link https://vikwp.com |
| 9 |
*/ |
| 10 |
|
| 11 |
defined('ABSPATH') or die('No script kiddies please!'); |
| 12 |
|
| 13 |
/** |
| 14 |
* Class handler for admin widget "inquiries chat". |
| 15 |
* |
| 16 |
* @since 1.18.8 (J) - 1.8.8 (WP) |
| 17 |
*/ |
| 18 |
class VikBookingAdminWidgetInquiriesChat extends VBOChatWidgetAdmin |
| 19 |
{ |
| 20 |
/** |
| 21 |
* A list holding all the supported chat categories. |
| 22 |
* |
| 23 |
* @var string[] |
| 24 |
* @since 1.8.8 |
| 25 |
*/ |
| 26 |
protected $involvedCategories = ['session']; |
| 27 |
|
| 28 |
/** |
| 29 |
* Class constructor will define the widget name and identifier. |
| 30 |
*/ |
| 31 |
public function __construct() |
| 32 |
{ |
| 33 |
// call parent constructor |
| 34 |
parent::__construct(); |
| 35 |
|
| 36 |
$this->widgetName = JText::translate('VBO_W_INQUIRIESCHAT_TITLE'); |
| 37 |
$this->widgetDescr = JText::translate('VBO_W_INQUIRIESCHAT_DESCR'); |
| 38 |
$this->widgetId = basename(__FILE__, '.php'); |
| 39 |
|
| 40 |
$this->widgetIcon = '<i class="' . VikBookingIcons::i('headset') . '"></i>'; |
| 41 |
$this->widgetStyleName = 'green'; |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* @inheritDoc |
| 46 |
*/ |
| 47 |
public function preload() |
| 48 |
{ |
| 49 |
// require FontAwesome brands |
| 50 |
VikBookingIcons::loadRemoteAssets(); |
| 51 |
|
| 52 |
// then preload parent widget |
| 53 |
return parent::preload(); |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* Checks for new notifications by using the previous preloaded watch-data. |
| 58 |
* |
| 59 |
* @param ?VBONotificationWatchdata $watch_data The preloaded watch-data object. |
| 60 |
* |
| 61 |
* @return array Data object to watch next and notifications array. |
| 62 |
* |
| 63 |
* @see preload() |
| 64 |
*/ |
| 65 |
public function getNotifications(?VBONotificationWatchdata $watch_data = null) |
| 66 |
{ |
| 67 |
// do not observe notifications |
| 68 |
return [null, null]; |
| 69 |
} |
| 70 |
} |
| 71 |
|