implement TwingleEvent

This commit is contained in:
Marc Michalsky forumZFD 2020-10-30 16:27:56 +01:00
parent 6b434e455f
commit 3554f958d2
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
10 changed files with 735 additions and 570 deletions

View file

@ -7,6 +7,8 @@ use CRM\TwingleCampaign\BAO\CustomField as CustomField;
use CRM_TwingleCampaign_ExtensionUtil as E;
use Exception;
include_once E::path() . '/CRM/TwingleCampaign/BAO/CustomField.php';
/**
* A singleton that caches mappings and settings
*
@ -24,6 +26,10 @@ class ExtensionCache {
private $templates;
/**
* Get an instance (singleton)
* @return ExtensionCache|null
*/
public static function getInstance() {
if (null === self::$_instance) {
self::$_instance = new self;
@ -31,6 +37,11 @@ class ExtensionCache {
return self::$_instance;
}
/**
* Protected ExtensionCache constructor.
*
* @throws \CiviCRM_API3_Exception
*/
protected function __construct() {
// Get a mapping of custom fields