Esempio n. 1
0
        public JsContextAll(string systemRootUrl, IBlock block, ILog parentLog)
            : base("Sxc.CliInf", parentLog, "building entire client-context")
        {
            var ctx        = block.Context;
            var versioning = Factory.Resolve <IPagePublishing>().Init(Log);

            Environment = new JsContextEnvironment(systemRootUrl, ctx, block);
            Language    = new JsContextLanguage(ctx.Tenant, block.ZoneId);
            User        = new JsContextUser(ctx.User);

            ContentBlock = new ClientInfoContentBlock(block, null, 0, versioning.Requirements(ctx.Container.Id));
            ContentGroup = new ClientInfoContentGroup(block);
            Ui           = new Ui(((BlockBuilder)block.BlockBuilder)?.UiAutoToolbar ?? false);

            error = new ClientInfosError(block);
        }
Esempio n. 2
0
        public JsContextAll Init(string systemRootUrl, IBlock block, ILog parentLog)
        {
            Log.LinkTo(parentLog);
            var ctx = block.Context;

            Environment = new JsContextEnvironment(systemRootUrl, ctx);
            Language    = _jsLangCtx.Init(ctx.Site, block.ZoneId);
            User        = new JsContextUser(ctx.User);

            ContentBlock = new ClientInfoContentBlock(block, null, 0, ctx.Publishing.Mode);
            ContentGroup = new ClientInfoContentGroup(block);
            Ui           = new Ui(((BlockBuilder)block.BlockBuilder)?.UiAutoToolbar ?? false);

            error = new ClientInfosError(block);
            return(this);
        }