public static function buildJsLink($url, $target = null, bool $history = true, bool $replaceTag = false)
    {
        $targetArg  = $target ? ($target[0] === '$' ? "," . $target : ",'#" . $target . "'") : '';
        $targetArg .= $replaceTag ? ',1' : '';
        if (!$history || $targetArg) {
            return "$.ajaxCall('" . $url . "'" . $targetArg . ");";
        } else {
            return "$.router.push('" . $url . "');";
        }
    }