public ModelFactoryBase(string settingsJson, string physicalTemplateFolder, Manifest.Manifest manifest, TemplateManifest templateManifest, TemplateFiles templateFiles, OpenContentModuleInfo module, int portalId, string cultureCode) { this._settingsJson = settingsJson; this._physicalTemplateFolder = physicalTemplateFolder; this._manifest = manifest; this._templateFiles = templateFiles; this._module = module; this._cultureCode = cultureCode; this._portalId = portalId; this._templateManifest = templateManifest; this._collection = templateManifest.Collection; this._detailTabId = DnnUtils.GetTabByCurrentCulture(this._portalId, module.GetDetailTabId(), GetCurrentCultureCode()); _ds = DataSourceManager.GetDataSource(_manifest.DataSource); _dsContext = OpenContentUtils.CreateDataContext(_module); }
public ModelFactoryBase(OpenContentModuleInfo module, PortalSettings portalSettings, string collection) { OpenContentSettings settings = module.Settings; this._settingsJson = settings.Data; this._physicalTemplateFolder = settings.Template.ManifestFolderUri.PhysicalFullDirectory + "\\"; this._manifest = settings.Template.Manifest; this._templateFiles = settings.Template?.Main; this._module = module; this._portalSettings = portalSettings; this._portalId = portalSettings.PortalId; this._templateManifest = settings.Template; this._collection = collection; this._detailTabId = DnnUtils.GetTabByCurrentCulture(this._portalId, module.GetDetailTabId(), GetCurrentCultureCode()); _ds = DataSourceManager.GetDataSource(_manifest.DataSource); _dsContext = OpenContentUtils.CreateDataContext(_module); }