public static function getInstance() { if (null == self::$instance) { self::$instance = new DataProviderUtils(); } return self::$instance; }
public function __construct() { $this->session = Session::getInstance(); $this->log = Log::getInstance(); $this->user = User::getInstance(); $this->storage = Storage::getInstance(); $this->webDBUtils = WebDBUtils::getInstance(); $this->dpUtils = DataProviderUtils::getInstance(); $this->screen = false; $this->availableFeatures = false; }
$model['assets'] = $adminUtils->loadSongsByUserId($id); $model['roles'] = $userRoles; $model['all_roles'] = $allRoles; $model['diff_roles'] = $diffRoles; $model['screens'] = $screenUtils->listScreens(); $res = $screenUtils->getScreenById($rid); $model['radio'] = $screenUtils->getName(); // renders view $app->render('admin-user.php', $model); return; break; case 'edit-radioscreen': $utils = Utils::getInstance(); $screenUtils = ScreenUtils::getInstance(); $radioUtils = RadioUtils::getInstance(); $dpUtils = DataProviderUtils::getInstance(); $model = $utils->getModel($app); if ('all' == $id) { $model['radios'] = $radioUtils->listRadios(); $app->render('admin-radioscreen-all.php', $model); return; } $radioUtils->getRadioById($id); $model['rid'] = $id; $model['config'] = $screenUtils->getConfig($id); if (false == $model['config']) { $session->addError('No config for screen: ' . $id); $model['radios'] = $radioUtils->listRadios(); $app->render('admin-radioscreen-all.php', $model); return; }