Table of Contents

Class MediaFileDetail

Namespace
Kentico.Xperience.Admin.Base.UIPages
Assembly
Kentico.Xperience.Admin.Base.dll

Media library general edit page.

[UIPageLocation(PageLocationEnum.SidePanel)]
[UIEvaluatePermission("View")]
[UINavigation(false)]
[UIBreadcrumbs(false)]
public sealed class MediaFileDetail : InfoEditPage<MediaFileInfo>, IPage
Inheritance
object
MediaFileDetail
Implements
Inherited Members
Extension Methods

Constructors

MediaFileDetail(IFormDataBinder, IInfoProvider<MediaLibraryInfo>, IAssetItemMapper, IFormComponentMapper, IUIPermissionEvaluator)

Initializes an instance of the MediaFileDetail class.

public MediaFileDetail(IFormDataBinder formDataBinder, IInfoProvider<MediaLibraryInfo> mediaLibraryInfoProvider, IAssetItemMapper assetItemMapper, IFormComponentMapper formComponentMapper, IUIPermissionEvaluator uiPermissionEvaluator)

Parameters

formDataBinder IFormDataBinder
mediaLibraryInfoProvider IInfoProvider<MediaLibraryInfo>
assetItemMapper IAssetItemMapper
formComponentMapper IFormComponentMapper
uiPermissionEvaluator IUIPermissionEvaluator

Properties

ObjectId

ID of the object.

[PageParameter(typeof(IntPageModelBinder))]
public override int ObjectId { get; set; }

Property Value

int

Methods

ConfigurePage()

Set up page's configuration. Configures the submit action.

public override Task ConfigurePage()

Returns

Task

ConfigureTemplateProperties(EditTemplateClientProperties)

Transforms the configuration to template properties.

public override Task<EditTemplateClientProperties> ConfigureTemplateProperties(EditTemplateClientProperties properties)

Parameters

properties EditTemplateClientProperties

Returns

Task<EditTemplateClientProperties>

Remarks

Performs also permission evaluation.

GetFormItems()

Prepares form items for editing object of the specified ObjectType.

protected override Task<ICollection<IFormItem>> GetFormItems()

Returns

Task<ICollection<IFormItem>>

Returns the collection of form items.

GetSubmitSuccessResponse(MediaFileInfo, ICollection<IFormItem>)

Response that has to be returned after successful form submission.

protected override Task<ICommandResponse> GetSubmitSuccessResponse(MediaFileInfo savedInfoObject, ICollection<IFormItem> items)

Parameters

savedInfoObject MediaFileInfo

Object info after persisting.

items ICollection<IFormItem>

Collection with updated form items.

Returns

Task<ICommandResponse>

SetFormData(MediaFileInfo, IFormFieldValueProvider)

Sets the infoObject and renames media file.

protected override Task SetFormData(MediaFileInfo infoObject, IFormFieldValueProvider fieldValueProvider)

Parameters

infoObject MediaFileInfo

Info object to be set.

fieldValueProvider IFormFieldValueProvider

Provider of form field values.

Returns

Task

Submit(FormSubmissionCommandArguments)

Handles the form submit command.

public override Task<ICommandResponse> Submit(FormSubmissionCommandArguments args)

Parameters

args FormSubmissionCommandArguments

Form submission arguments.

Returns

Task<ICommandResponse>

Returns the form submission result.

Remarks

See Also

SubmitInternal(FormSubmissionCommandArguments, ICollection<IFormItem>, IFormFieldValueProvider)

Handles the internal specific processing of form submit command.

protected override Task<ICommandResponse> SubmitInternal(FormSubmissionCommandArguments args, ICollection<IFormItem> items, IFormFieldValueProvider formFieldValueProvider)

Parameters

args FormSubmissionCommandArguments

Form submission arguments.

items ICollection<IFormItem>

Form items with bound component values.

formFieldValueProvider IFormFieldValueProvider

Provider of form field values.

Returns

Task<ICommandResponse>

Returns the form submission result.

Remarks

This method is called by the default implementation of the Submit(FormSubmissionCommandArguments) method.

See Also