public void ContentFieldAttached(ContentFieldAttachedContext context) { var eventData = new Dictionary <string, object> { { "ContentPartName", context.ContentPartName }, { "ContentFieldName", context.ContentFieldName }, { "ContentFieldTypeName", context.ContentFieldTypeName }, { "ContentFieldDisplayName", context.ContentFieldDisplayName } }; _auditTrailManager.CreateRecord <ContentPartAuditTrailEventProvider>(ContentPartAuditTrailEventProvider.FieldAdded, _wca.GetContext().CurrentUser, properties: null, eventData: eventData, eventFilterKey: "contentpart", eventFilterData: context.ContentPartName); }
public void ContentFieldAttached(ContentFieldAttachedContext context) { //this handles a special condition: all fields in the ProfilePart should by default be set //to be displayed/editable in front-end. if (context.ContentPartName == "ProfilePart") { var typeDefinitions = _contentDefinitionManager .ListTypeDefinitions() .Where(td => TypeHasProfilePart(td)); foreach (var typeDefinition in typeDefinitions) { foreach (var provider in _frontEndSettingsProviders .Where(prov => prov.ForParts().Contains("ProfilePart"))) { provider.ConfigureDefaultValues(typeDefinition, context.ContentFieldTypeName + "." + context.ContentFieldName); } } } }
public void ContentFieldAttached(ContentFieldAttachedContext context) { }