add method to check if module is active on blog
This commit is contained in:
parent
0e46e1cafa
commit
274956dd72
1 changed files with 10 additions and 0 deletions
|
@ -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 a new issue