protected override void OnInit(EventArgs e) { base.OnInit(e); var dataInstaller = new ArticulateDataInstaller(); var root = dataInstaller.Execute(); BlogUrl = Umbraco.TypedContent(root.Id).Url; }
protected override void OnInit(EventArgs e) { base.OnInit(e); var dataInstaller = new ArticulateDataInstaller(Services); var root = dataInstaller.Execute(); if (root != null) { BlogUrl = Umbraco.TypedContent(root.Id).Url; } else { BlogUrl = "/"; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); var dataInstaller = new ArticulateDataInstaller(Services, Security.CurrentUser.Id); var root = dataInstaller.Execute(out bool packageInstalled); if (root != null) { BlogUrl = Umbraco.TypedContent(root.Id).Url; } else { BlogUrl = "/"; } }
public IHttpActionResult PostInstall() { var dataInstaller = new ArticulateDataInstaller(Services, Security.CurrentUser.Id); //TODO: indicate that it's already installed and no changes have been made var root = dataInstaller.Execute(out bool packageInstalled); string blogUrl; if (root != null) { blogUrl = Umbraco.TypedContent(root.Id).Url; } else { blogUrl = "/"; } return(Ok(blogUrl)); }
public ArticulateBlogDataInstallController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper, ArticulateDataInstaller installer) : base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper) { _installer = installer; }