add method to check if module is active on blog

This commit is contained in:
Jean-Christian Denis 2023-04-25 15:01:31 +02:00
parent 0e46e1cafa
commit 274956dd72
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -34,6 +34,16 @@ use Exception;
*/
class Utils
{
/**
* Check if module is active on current blog
*
* @return bool True on activated
*/
public static function isActive(): bool
{
return !is_null(dcCore::app()->blog) && dcCore::app()->blog->settings->get(My::id())->get('active');
}
/**
* Open cursor.
*