Exemple #1
0
        public ClientInfosAll(string systemRootUrl, PortalSettings ps, IContainer mic, Blocks.IBlockBuilder blockBuilder, UserInfo uinfo, int zoneId, bool isCreated, bool autoToolbar, ILog parentLog)
            : base("Sxc.CliInf", parentLog, "building entire client-context")
        {
            var versioning = blockBuilder.Environment.PagePublishing;

            Environment = new ClientInfosEnvironment(systemRootUrl, ps, mic, blockBuilder);
            Language    = new ClientInfosLanguages(ps, zoneId);
            User        = new ClientInfosUser(uinfo);

            ContentBlock = new ClientInfoContentBlock(blockBuilder.Block, null, 0, versioning.Requirements(mic.Id));
            ContentGroup = new ClientInfoContentGroup(blockBuilder, isCreated);
            Ui           = new Ui(((Blocks.BlockBuilder)blockBuilder).UiAutoToolbar);

            error = new ClientInfosError(blockBuilder.Block);
        }
Exemple #2
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);
        }
Exemple #3
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);
        }