portal.mkgtu.ru/common/components/notification/NotificationSettingsManager...

15 lines
339 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
namespace common\components\notification;
use common\models\notification\NotificationSetting;
class NotificationSettingsManager
{
public static function isWidgetEnabled(): bool
{
$model = NotificationSetting::findOne(['name' => 'enable_widget']);
return isset($model) ? $model->value == 1 : false;
}
}