/** * @param $timeCardId */ private function setGlobals($timeCardId) { // set appGlobal.clientId to current view, otherwise 'if (appGlobal.clientId)' in TimeCard.js causes js load failure. appGlobals::populateJsGlobalClient(); // set appGlobal.taskTypeUpdateURI for ajax update routing. appGlobals::populateJsGlobalTaskTypeUpdateURI(); // set appGlobal.ttvTypeClearText when phpunit selenium testing, only. appGlobals::populateJsGlobalTtvTypeClearTextTrue(); // correctly sets the back button if the $timeCardId has been passed, the back button is set, else not. if (is_null($timeCardId)) { session()->forget(appGlobals::getTaskTableName()); } else { session()->set(appGlobals::getTaskTableName(), $timeCardId); } }