Skip to content
Snippets Groups Projects
Commit 513c1891 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX 8526 add structure DOM if v2

parent df96f281
No related branches found
No related tags found
No related merge requests found
......@@ -355,7 +355,7 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) {
$user = \User\models\UserModel::getByUserId(['userId' => $cookie['userId'], 'select' => ['password_modification_date', 'change_password', 'status']]);
//HTML CONTENT OF ANGULAR
echo '<body></body>';
echo \SrcCore\models\CoreConfigModel::initAngularStructure();
if ($user['status'] == 'ABS') {
$_REQUEST['triggerAngular'] = 'activateUser';
......
......@@ -203,4 +203,40 @@ class CoreConfigModel
return $xmlfile;
}
public static function getFavIcon(array $aArgs)
{
ValidatorModel::notEmpty($aArgs, ['path']);
ValidatorModel::stringType($aArgs, ['path']);
$customId = CoreConfigModel::getCustomId();
if (file_exists("custom/{$customId}/{$aArgs['path']}")) {
$path = "custom/{$customId}/{$aArgs['path']}";
} else {
$path = $aArgs['path'];
}
return $path;
}
public static function initAngularStructure()
{
$lang = CoreConfigModel::getLanguage();
$appName = CoreConfigModel::getApplicationName();
$favIconPath = CoreConfigModel::getFavIcon(["path" => "apps/maarch_entreprise/img/logo_only.svg"]);
$structure = '<!doctype html>';
$structure = "<html lang='{$lang}'>";
$structure .= '<head>';
$structure .= "<meta charset='utf-8'>";
$structure .= "<title>{$appName}</title>";
$structure .= "<link rel='icon' href='../../{$favIconPath}' />";
$structure .= '</head>';
$structure .= '<body>';
$structure .= '</body>';
$structure .= '</html>';
return $structure;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment