From 3bb3ffa12e32ff64814b6f13728f30c67db58fa7 Mon Sep 17 00:00:00 2001 From: israelmelo Date: Thu, 5 Sep 2024 15:56:45 -0300 Subject: [PATCH] =?UTF-8?q?Cria=C3=A7=C3=A3o=20da=20instancia=20do=20plugi?= =?UTF-8?q?n=20Ref.:=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Plugin.php b/Plugin.php index 0ddf7f0..280eecb 100644 --- a/Plugin.php +++ b/Plugin.php @@ -16,6 +16,8 @@ class Plugin extends \MapasCulturais\Plugin { + protected static $instance; + public function __construct($config = []) { $default_terms = [ @@ -101,6 +103,7 @@ public function __construct($config = []) ]; parent::__construct($config); + self::$instance = $this; } public function _init() @@ -402,4 +405,8 @@ public function getAdminEmail($recipient): string { return $email; } + + public static function getInstance(){ + return self::$instance; + } }