getLaunchData(); if ($launchData->hasVariable(self::LTI_VARIABLE) && $this->hasTheme($launchData->getVariable(self::LTI_VARIABLE))) { return $this->getThemeById($launchData->getVariable(self::LTI_VARIABLE)); } } return parent::getTheme(); } /** * Tells if the page has to be headless: without header and footer. * @return bool|mixed * @throws \common_exception_Error * @throws \oat\taoLti\models\classes\LtiVariableMissingException */ public function isHeadless() { if ($this->hasOption(self::OPTION_HEADLESS_PAGE)) { return $this->getOption(self::OPTION_HEADLESS_PAGE); } $currentSession = \common_session_SessionManager::getSession(); if ($currentSession instanceof TaoLtiSession) { $launchData = $currentSession->getLaunchData(); $presentationTarget = $launchData->hasVariable(self::LTI_PRESENTATION_TARGET) ? $launchData->getVariable(self::LTI_PRESENTATION_TARGET) : ''; return $presentationTarget == 'frame' || $presentationTarget == 'iframe'; } return true; } }