Пример #1
0
 private function jsCommon()
 {
     $params['url'] = PsUrl::current();
     $params['userId'] = AuthManager::getUserIdOrNull();
     $params['isAuthorized'] = AuthManager::isAuthorized();
     $params['isDOA'] = PsSettings::DEVMODE_OR_ADMIN();
     $params['isLogging'] = PsSettings::DEVMODE_OR_ADMIN();
     $params['currentSubmitTimeout'] = ActivityWatcher::getWaitTime();
     $params['tzOffset'] = PsTimeZone::inst()->getCurrentDateTimeZone()->getOffset(new DateTime());
     $params['marker'] = AuthManager::getUserSessoinMarker();
     $params['foldings'] = FoldedStorage::listEntitiesRel();
     return $params;
 }
Пример #2
0
 private function jsCommon(PageContext $ctxt)
 {
     $params['url'] = $ctxt->getRequestUrl();
     $params['isPopup'] = $ctxt->isPopupPage();
     $params['userId'] = AuthManager::getUserIdOrNull();
     $params['isAuthorized'] = AuthManager::isAuthorized();
     $params['isDOA'] = PsSettings::DEVMODE_OR_ADMIN();
     $params['isLogging'] = PsSettings::DEVMODE_OR_ADMIN();
     $params['currentSubmitTimeout'] = ActivityWatcher::getWaitTime();
     $params['tzOffset'] = PsTimeZone::inst()->getCurrentDateTimeZone()->getOffset(new DateTime());
     $params['marker'] = AuthManager::getUserSessoinMarker();
     /* @var $folding FoldedResources */
     foreach (Handlers::getInstance()->getFoldingsIndexed() as $unique => $folding) {
         $params['foldings'][$unique] = $folding->getResourcesDm()->relDirPath();
     }
     return $params;
 }