. */ class CRM_Civiproxy_Mosaico { /** * @var CRM_Civiproxy_Mosaico */ private static $singleton; /** * @var String */ private $mosiacoExtenionUrl; /** * @var bool */ private $isMosaicoInstalled = false; private function __construct() { try { $mosaicoExt = civicrm_api3('Extension', 'getsingle', ['full_name' => "uk.co.vedaconsulting.mosaico"]); $this->isMosaicoInstalled = true; $this->mosiacoExtenionUrl = CRM_Mosaico_ExtensionUtil::url(); } catch (\Exception $ex) { // Do nothing } } /** * @return CRM_Civiproxy_Mosaico */ public static function singleton() { if (!self::$singleton) { self::$singleton = new CRM_Civiproxy_Mosaico(); } return self::$singleton; } /** * @return bool */ public function isMosaicoInstalled() { return $this->isMosaicoInstalled; } /** * @return string */ public function getMosaicoExtensionUrl() { return $this->mosiacoExtenionUrl; } }