public IHttpActionResult DeleteTheme(string storeId, string themeId) { base.CheckCurrentUserHasPermissionForObjects(ContentPredefinedPermissions.Delete, new ContentScopeObject { StoreId = storeId }); _contentStorageProvider.Remove(new string[] { "/Themes/" + storeId + "/" + themeId }); return(this.Ok()); }
public IHttpActionResult DeleteItem(string storeId, [FromUri] string[] pageNamesAndLanguges) { CheckCurrentUserHasPermissionForObjects(ContentPredefinedPermissions.Delete, new ContentScopeObject { StoreId = storeId }); var pages = PagesUtility.GetShortPageInfoFromString(pageNamesAndLanguges); _contentStorageProvider.Remove(pages.Select(x => "/Pages/" + storeId + "/" + x.Name).ToArray()); return(StatusCode(HttpStatusCode.NoContent)); }
public void DeleteTypeDefinition(string name) { var record = _contentStorageProvider .Query <ContentTypeDefinitionRecord>(x => x.Name == name) .SingleOrDefault(); // deletes the content type record associated if (record != null) { _contentStorageProvider.Remove(record); } }