add method to check if module is active on blog
parent
0e46e1cafa
commit
274956dd72
|
@ -34,6 +34,16 @@ use Exception;
|
||||||
*/
|
*/
|
||||||
class Utils
|
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.
|
* Open cursor.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue