Class ContentTypeFields
Fields tab of the content types edit page.
public sealed class ContentTypeFields : FieldEditorPageBase, IPage
- Inheritance
-
objectFieldEditorPageBaseContentTypeFields
- Implements
- Extension Methods
Constructors
ContentTypeFields(IFormItemCollectionProvider, IFormDataBinder, IFormComponentCommandInvoker, IAiraClient, IAuthenticatedUserAccessor, IEnumerable<IContentTypeSpecificFieldsProvider>, IReusableFieldSchemaManager)
Initializes a new instance of ContentTypeFields page.
public ContentTypeFields(IFormItemCollectionProvider formItemCollectionProvider, IFormDataBinder formDataBinder, IFormComponentCommandInvoker formComponentCommandInvoker, IAiraClient airaClient, IAuthenticatedUserAccessor authenticatedUserAccessor, IEnumerable<IContentTypeSpecificFieldsProvider> contentTypeSpecificFieldsProviders, IReusableFieldSchemaManager schemaManager)
Parameters
formItemCollectionProvider
IFormItemCollectionProviderformDataBinder
IFormDataBinderformComponentCommandInvoker
IFormComponentCommandInvokerairaClient
IAiraClientauthenticatedUserAccessor
IAuthenticatedUserAccessorcontentTypeSpecificFieldsProviders
IEnumerable<IContentTypeSpecificFieldsProvider>schemaManager
IReusableFieldSchemaManager
Properties
ClassId
Class ID obtained from url.
[PageParameter(typeof(IntPageModelBinder))]
public int ClassId { get; set; }
Property Value
- int
ClassName
Gets class name to be edited.
protected override string ClassName { get; }
Property Value
- string
Remarks
Class name has to be retrievable from FormHelper otherwise page validation fails.
Methods
ConfigurePage()
Allows configure and share page specific values prior invocation of the ConfigureTemplateProperties(TClientProperties) or command method.
public override Task ConfigurePage()
Returns
- Task
ConfigureTemplateProperties(FieldEditorTemplateClientProperties)
Gets the object representing client side template properties.
public override Task<FieldEditorTemplateClientProperties> ConfigureTemplateProperties(FieldEditorTemplateClientProperties properties)
Parameters
properties
FieldEditorTemplateClientPropertiesInitialized properties object.
Returns
CreateSchema(CreateSchemaArguments)
Creates schemas based on given argument within the content type.
public Task<ICommandResponse> CreateSchema(CreateSchemaArguments args)
Parameters
args
CreateSchemaArgumentsCreate schema command argument.
Returns
- Task<ICommandResponse>
DeleteField(DeleteFieldArguments)
Removes the field or schema from the content type.
public override Task<ICommandResponse> DeleteField(DeleteFieldArguments args)
Parameters
args
DeleteFieldArgumentsDelete command argument.
Returns
- Task<ICommandResponse>
GetAllFormFields()
Returns all form fields.
protected override List<FormFieldInfo> GetAllFormFields()
Returns
- List<FormFieldInfo>
Remarks
Returns also fields from assigned reusable schemas.
GetFormFieldMetadata(GetFormFieldMetadataArguments)
Gets the properties of form components for the Form.tsx component editing a single form field.
public override Task<ICommandResponse> GetFormFieldMetadata(GetFormFieldMetadataArguments args)
Parameters
Returns
- Task<ICommandResponse>
GetFormItems(string)
Returns form items to be visible in the field editor from form definition of the class specified by className
.
protected override ICollection<IDataDefinitionItem> GetFormItems(string className)
Parameters
className
stringClass name
Returns
- ICollection<IDataDefinitionItem>
GetSchemaPanelConfiguration()
Command provides side panel with schema listing configuration.
public Task<ICommandResponse<ListingTemplateClientProperties>> GetSchemaPanelConfiguration()
Returns
IsDeletable(string)
Indicates if the field can be removed from the class.
protected override bool IsDeletable(string fieldName)
Parameters
fieldName
string
Returns
- bool
LoadSchemas(LoadDataCommandArguments, CancellationToken)
Command loads schema data to previously opened side panel.
public Task<ICommandResponse<LoadDataResult>> LoadSchemas(LoadDataCommandArguments args, CancellationToken cancellationToken)
Parameters
args
LoadDataCommandArgumentscancellationToken
CancellationToken
Returns
- Task<ICommandResponse<LoadDataResult>>
NormalizeFieldName(string)
Translate schema code name to its guid using value persisted in properties collection.
protected override string NormalizeFieldName(string fieldName)
Parameters
fieldName
string
Returns
- string
ValidatePage()
Validates the page state prior invocation of the ConfigurePage() method.
public override Task<PageValidationResult> ValidatePage()
Returns
- Task<PageValidationResult>