Class ContentItemProperties
Content item properties page.
public sealed class ContentItemProperties : ModelEditPage<ContentItemPropertiesModel>, IPage
- Inheritance
-
objectContentItemProperties
- Implements
- Inherited Members
- Extension Methods
Constructors
ContentItemProperties(IFormItemCollectionProvider, IFormDataBinder, IContentItemManagerFactory, IAuthenticatedUserAccessor, IInfoProvider<ContentItemInfo>, IContentLanguageRetriever)
Initializes an instance of the ContentItemProperties class.
public ContentItemProperties(IFormItemCollectionProvider formItemCollectionProvider, IFormDataBinder formDataBinder, IContentItemManagerFactory contentItemManagerFactory, IAuthenticatedUserAccessor userAccessor, IInfoProvider<ContentItemInfo> contentItemProvider, IContentLanguageRetriever contentLanguageRetriever)
Parameters
formItemCollectionProvider
IFormItemCollectionProviderformDataBinder
IFormDataBindercontentItemManagerFactory
IContentItemManagerFactoryuserAccessor
IAuthenticatedUserAccessorcontentItemProvider
IInfoProvider<ContentItemInfo>contentLanguageRetriever
IContentLanguageRetriever
Properties
ContentLanguageIdentifier
Content language identifier.
[PageParameter(typeof(ContentLanguageModelBinder), typeof(ContentHubContentLanguage))]
public ContentLanguageUrlIdentifier ContentLanguageIdentifier { get; set; }
Property Value
ItemID
Item ID.
[PageParameter(typeof(IntPageModelBinder), typeof(ContentItemEditSection))]
public int ItemID { get; set; }
Property Value
- int
Model
Gets edited model that represents the form.
protected override ContentItemPropertiesModel Model { get; }
Property Value
SuccessMessageKey
Gets or sets the success message displayed after submitting the form.
protected override string SuccessMessageKey { get; }
Property Value
- string
Methods
Change(FormChangeCommandArguments)
Handles the form change command. The command is invoked whenever visibility conditions of the form need to be reevaluated to re-render the form.
public override Task<ICommandResponse<FormChangeResult>> Change(FormChangeCommandArguments args)
Parameters
args
FormChangeCommandArgumentsForm change arguments.
Returns
- Task<ICommandResponse<FormChangeResult>>
Returns the form change result.
ConfigurePage()
Set up page's configuration. Configures the submit action.
public override Task ConfigurePage()
Returns
- Task
GetFormItems()
protected override Task<ICollection<IFormItem>> GetFormItems()
Returns
- Task<ICollection<IFormItem>>
Remarks
Override the method in case when additional set-up of form components is required.
GetPagePermissionEvaluator()
Gets the permission evaluator for the current page.
protected override Task<Func<string, Task<PermissionEvaluationResult>>> GetPagePermissionEvaluator()
Returns
- Task<Func<string, Task<PermissionEvaluationResult>>>
Remarks
Default implementation uses the IUIPermissionEvaluator.
ProcessFormData(ContentItemPropertiesModel, ICollection<IFormItem>)
Stores the model
and creates a response for the Submit(FormSubmissionCommandArguments) command.
protected override Task<ICommandResponse> ProcessFormData(ContentItemPropertiesModel model, ICollection<IFormItem> formItems)
Parameters
model
ContentItemPropertiesModelModel to be stored.
formItems
ICollection<IFormItem>Form items with bound component values.
Returns
- Task<ICommandResponse>
The response to be used for the Submit(FormSubmissionCommandArguments) command.
Submit(FormSubmissionCommandArguments)
Handles the form submit command.
public override Task<ICommandResponse> Submit(FormSubmissionCommandArguments args)
Parameters
args
FormSubmissionCommandArgumentsForm submission arguments.
Returns
- Task<ICommandResponse>
Returns the form submission result.
Remarks
The default implementation calls the SubmitInternal(FormSubmissionCommandArguments, ICollection<IFormItem>, IFormFieldValueProvider) method.
- See Also
ValidatePage()
Validates the page state prior invocation of the ConfigurePage() method.
public override Task<PageValidationResult> ValidatePage()
Returns
- Task<PageValidationResult>