1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99:
<?php
declare(strict_types=1);
class Crm_Module extends Module_Skeleton
{
const FROM_ADDRESS = CRM_FROM_ADDRESS;
const REPLY_ADDRESS = CRM_REPLY_ADDRESS;
const FROM_NAME = CRM_FROM_NAME;
const FROM_NO_REPLY_ADDRESS = CRM_FROM_NO_REPLY_ADDRESS;
const MAX_SMS_LENGTH = 150;
const COPY_ADMIN = CRM_COPY_ADMIN;
const TICKET_STCLOSE = 'close';
const TICKET_STAPPEND = 'append';
const TICKET_STOPEN = 'open';
const PRIORITIES = array('normal', 'high', 'outage');
const LOW_PRIORITY_SUBJECTS = array('billing');
const SHORT_COPY_ADMIN = CRM_SHORT_COPY_ADMIN;
private static $CRM_SERVER_HOST = CRM_TICKET_HOST;
private static $CRM_SERVER_USER = CRM_TICKET_USER;
private static $CRM_SERVER_PASSWORD = CRM_TICKET_PASSWORD;
private static $CRM_SERVER_DATABASE = CRM_TICKET_DB;
public function __construct()
{
parent::__construct();
$this->exportedFunctions = array(
'*' => PRIVILEGE_SITE | PRIVILEGE_ADMIN,
'append_ticket_via_email' => PRIVILEGE_ADMIN,
'get_notifications' => PRIVILEGE_ALL,
'cancel_notification' => PRIVILEGE_ALL,
);
}
public function enabled(): bool
{
return $this->configured() &&
($this->permission_level & PRIVILEGE_ADMIN || !$this->getServiceValue('billing', 'parent_invoice'));
}
public function configured(): bool
{
return false;
}
public function get_notifications(): array
{
return [];
}
}