Table of Contents

Class ContentItemSelectorComponent

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

Represents content item selector form component.

[ComponentAttribute(typeof(ContentItemSelectorComponentAttribute))]
public sealed class ContentItemSelectorComponent : ContentItemSelectorComponentBase<ContentItemSelectorProperties>, IFormComponent, IFormItem<IFormComponentClientProperties>, IFormItem
Inheritance
object
ContentItemSelectorComponent
Implements
Inherited Members
Extension Methods

Constructors

ContentItemSelectorComponent(IFormComponentCommandInvoker, IFormDataBinder, IAuthenticatedUserAccessor, IContentItemManagerFactory, ILocalizationService, IEventLogService, IFormItemCollectionProvider, IContentLanguageRetriever, IContentItemDisplayNameValidator, IServiceProvider)

Initializes a new instance of ContentItemSelectorComponent.

public ContentItemSelectorComponent(IFormComponentCommandInvoker formComponentCommandInvoker, IFormDataBinder formDataBinder, IAuthenticatedUserAccessor userAccessor, IContentItemManagerFactory contentItemManagerFactory, ILocalizationService localizationService, IEventLogService eventLogService, IFormItemCollectionProvider formItemCollectionProvider, IContentLanguageRetriever contentLanguageRetriever, IContentItemDisplayNameValidator contentItemDisplayNameValidator, IServiceProvider serviceProvider)

Parameters

formComponentCommandInvoker IFormComponentCommandInvoker
formDataBinder IFormDataBinder
userAccessor IAuthenticatedUserAccessor
contentItemManagerFactory IContentItemManagerFactory
localizationService ILocalizationService
eventLogService IEventLogService
formItemCollectionProvider IFormItemCollectionProvider
contentLanguageRetriever IContentLanguageRetriever
contentItemDisplayNameValidator IContentItemDisplayNameValidator
serviceProvider IServiceProvider

Fields

CREATE_FORM_NAME_PREFIX

Create form name prefix.

public const string CREATE_FORM_NAME_PREFIX = "createcontentitem"

Field Value

string

IDENTIFIER

Represents the ContentItemSelectorComponent identifier.

public const string IDENTIFIER = "Kentico.Administration.ContentItemSelector"

Field Value

string

Properties

ClientComponentName

Name of the front-end type implementing the UI form component.

public override string ClientComponentName { get; }

Property Value

string

Methods

Change(FormSubmissionCommandArguments, CancellationToken)

Handles the form change command. The command is invoked whenever visibility conditions or form component configurators of the form need to be reevaluated to re-render the form.

public Task<ICommandResponse<FilterFormChangeResult>> Change(FormSubmissionCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args FormSubmissionCommandArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<FilterFormChangeResult>>

ChangeCreateSmartFolderForm(FormSubmissionCommandArguments, CancellationToken)

Handles the create smart folder form change command. The command is invoked whenever visibility conditions or form component configurators of the form need to be reevaluated to re-render the form.

public Task<ICommandResponse<FilterFormChangeResult>> ChangeCreateSmartFolderForm(FormSubmissionCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args FormSubmissionCommandArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<FilterFormChangeResult>>

CloneSmartFolder(CloneSmartFolderArguments, CancellationToken)

public Task<ICommandResponse<CloneSmartFolderResult>> CloneSmartFolder(CloneSmartFolderArguments args, CancellationToken cancellationToken)

Parameters

args CloneSmartFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<CloneSmartFolderResult>>

ConfigureClientProperties(ContentItemSelectorClientProperties)

Configures the form component client properties.

protected override Task ConfigureClientProperties(ContentItemSelectorClientProperties clientProperties)

Parameters

clientProperties ContentItemSelectorClientProperties

The current instance of the form component client properties.

Returns

Task

Remarks

Override this method in order to configure form component client properties.

ConfigureComponent()

Configures the form component. This method is called when all form component properties are set.

protected override void ConfigureComponent()

Remarks

Override this method to set component inner state, like additional component validation rules.

CreateContentItem(ContentItemSubmissionCommandArguments, string, VersionStatus, ContentItemData, CancellationToken)

Creates a reusable content item based on provided parameters.

protected override Task<int> CreateContentItem(ContentItemSubmissionCommandArguments args, string languageName, VersionStatus versionStatus, ContentItemData data, CancellationToken cancellationToken)

Parameters

args ContentItemSubmissionCommandArguments

Submission arguments.

languageName string

Language code name.

versionStatus VersionStatus

Version status.

data ContentItemData

Content item data retrieved from form.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<int>

Content item identifier of newly created item.

Remarks

Method creates a reusable content item. If you want to create specific content type item you need to override this method.

CreateFolder(CreateFolderArguments, CancellationToken)

public Task<ICommandResponse<CreateFolderResult>> CreateFolder(CreateFolderArguments args, CancellationToken cancellationToken)

Parameters

args CreateFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<CreateFolderResult>>

CreateSmartFolder(CreateSmartFolderArguments, CancellationToken)

public Task<ICommandResponse<CreateSmartFolderResult>> CreateSmartFolder(CreateSmartFolderArguments args, CancellationToken cancellationToken)

Parameters

args CreateSmartFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<CreateSmartFolderResult>>

CreateSmartFolderConfirmFilter(CreateSmartFolderConfirmFilterArguments, CancellationToken)

public Task<ICommandResponse<CreateSmartFolderConfirmFilterResult>> CreateSmartFolderConfirmFilter(CreateSmartFolderConfirmFilterArguments args, CancellationToken cancellationToken)

Parameters

args CreateSmartFolderConfirmFilterArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<CreateSmartFolderConfirmFilterResult>>

DoesFilterSupportDelivery(FilterDeliverySupportArguments, CancellationToken)

public Task<ICommandResponse<FilterDeliverySupportResult>> DoesFilterSupportDelivery(FilterDeliverySupportArguments args, CancellationToken cancellationToken)

Parameters

args FilterDeliverySupportArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<FilterDeliverySupportResult>>

EnableContentDeliveryForSmartFolder(EnableContentDeliveryForSmartFolderArguments, CancellationToken)

public Task<ICommandResponse> EnableContentDeliveryForSmartFolder(EnableContentDeliveryForSmartFolderArguments args, CancellationToken cancellationToken)

Parameters

args EnableContentDeliveryForSmartFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse>

GetContentTypeSelectionModel()

Returns the model object for the content type selection form.

protected override object GetContentTypeSelectionModel()

Returns

object

GetFolder(GetFolderArguments, CancellationToken)

Routes the command to the GetFolder(GetFolderArguments, CancellationToken) method.

public Task<ICommandResponse<Folder>> GetFolder(GetFolderArguments args, CancellationToken cancellationToken)

Parameters

args GetFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<Folder>>

GetFolderPath(GetFolderArguments, CancellationToken)

Routes the command to the GetFolderPath(GetFolderArguments, CancellationToken) method.

public Task<ICommandResponse<ICollection<Folder>>> GetFolderPath(GetFolderArguments args, CancellationToken cancellationToken)

Parameters

args GetFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<ICollection<Folder>>>

GetFolderSubtree(GetFolderArguments, CancellationToken)

public Task<ICommandResponse<Folder>> GetFolderSubtree(GetFolderArguments args, CancellationToken cancellationToken)

Parameters

args GetFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<Folder>>

GetFormItemsForCloneSmartFolder(GetFormItemsArguments, CancellationToken)

public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForCloneSmartFolder(GetFormItemsArguments args, CancellationToken cancellationToken)

Parameters

args GetFormItemsArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetFormItemsResult>>

GetFormItemsForCreateFolder(GetFormItemsArguments, CancellationToken)

public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForCreateFolder(GetFormItemsArguments args, CancellationToken cancellationToken)

Parameters

args GetFormItemsArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetFormItemsResult>>

GetFormItemsForCreateSmartFolder(CancellationToken)

Routes the command to the Kentico.Xperience.Admin.Base.ISmartFolderCommandManager.GetFormItemsForCreateSmartFolder(System.Threading.CancellationToken) method.

public Task<ICommandResponse<GetFormItemsForCreateSmartFolderResult>> GetFormItemsForCreateSmartFolder(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetFormItemsForCreateSmartFolderResult>>

GetFormItemsForMoveFolder(GetFormItemsArguments, CancellationToken)

public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForMoveFolder(GetFormItemsArguments args, CancellationToken cancellationToken)

Parameters

args GetFormItemsArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetFormItemsResult>>

GetFormItemsForRenameFolder(GetFormItemsArguments, CancellationToken)

public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForRenameFolder(GetFormItemsArguments args, CancellationToken cancellationToken)

Parameters

args GetFormItemsArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetFormItemsResult>>

GetFormItemsForRenameSmartFolder(GetFormItemsArguments, CancellationToken)

public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForRenameSmartFolder(GetFormItemsArguments args, CancellationToken cancellationToken)

Parameters

args GetFormItemsArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetFormItemsResult>>

GetFormItemsForSaveSmartFolder(CancellationToken)

Routes the command to the Kentico.Xperience.Admin.Base.ISmartFolderCommandManager.GetFormItemsForSaveSmartFolder(System.Threading.CancellationToken) method.

public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForSaveSmartFolder(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetFormItemsResult>>

GetListingConfiguration(LoadListingConfigurationCommandArguments)

Returns listing configuration.

public Task<ICommandResponse<LoadListingConfigurationCommandResult>> GetListingConfiguration(LoadListingConfigurationCommandArguments args)

Parameters

args LoadListingConfigurationCommandArguments

Returns

Task<ICommandResponse<LoadListingConfigurationCommandResult>>

GetNestedFormItems()

Initializes form context within the nested form.

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

Returns

Task<ICollection<IFormItem>>

GetSmartFolderFilter(GetSmartFolderFilterArguments, CancellationToken)

public Task<ICommandResponse<GetSmartFolderFilterResult>> GetSmartFolderFilter(GetSmartFolderFilterArguments args, CancellationToken cancellationToken)

Parameters

args GetSmartFolderFilterArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetSmartFolderFilterResult>>

GetSmartFolders(GetSmartFoldersArguments, CancellationToken)

public Task<ICommandResponse<GetSmartFoldersResult>> GetSmartFolders(GetSmartFoldersArguments args, CancellationToken cancellationToken)

Parameters

args GetSmartFoldersArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<GetSmartFoldersResult>>

IsSmartFolderDeliverySupported(SmartFolderDeliverySupportArguments, CancellationToken)

public Task<ICommandResponse<SmartFolderDeliverySupportResult>> IsSmartFolderDeliverySupported(SmartFolderDeliverySupportArguments args, CancellationToken cancellationToken)

Parameters

args SmartFolderDeliverySupportArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<SmartFolderDeliverySupportResult>>

LoadSelectorData(LoadSelectorDataCommandArguments, CancellationToken)

Loads data for the content item selector.

public Task<ICommandResponse<LoadDataResult>> LoadSelectorData(LoadSelectorDataCommandArguments args, CancellationToken cancellationToken)

Parameters

args LoadSelectorDataCommandArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<LoadDataResult>>

MassMove(IEnumerable<int>, MoveContentItemModel, CancellationToken)

Moves multiple content items to a folder specified by the model.

public Task<ICommandResponse<MassActionResult>> MassMove(IEnumerable<int> identifiers, MoveContentItemModel model, CancellationToken cancellationToken)

Parameters

identifiers IEnumerable<int>

IDs of the content items to be moved.

model MoveContentItemModel

Model describing where to move the content items.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ICommandResponse<MassActionResult>>

MoveContentItem(int, MoveContentItemModel, CancellationToken)

Moves a content item to a folder specified by the model.

public Task<ICommandResponse<RowActionResult>> MoveContentItem(int id, MoveContentItemModel model, CancellationToken cancellationToken)

Parameters

id int

ID of the content item to be moved.

model MoveContentItemModel

Model describing where to move the content item.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<RowActionResult>>

MoveFolder(MoveFolderArguments, CancellationToken)

public Task<ICommandResponse<MoveFolderResult>> MoveFolder(MoveFolderArguments args, CancellationToken cancellationToken)

Parameters

args MoveFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<MoveFolderResult>>

MoveItemFormChange(FormChangeCommandArguments, CancellationToken)

Handles the change command for confirmation dialog. The command is invoked whenever visibility conditions or form component configurators of the form need to be reevaluated to re-render the form.

public Task<ICommandResponse<FormChangeResult>> MoveItemFormChange(FormChangeCommandArguments args, CancellationToken cancellationToken)

Parameters

args FormChangeCommandArguments

Form change command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<FormChangeResult>>

RenameFolder(RenameFolderArguments, CancellationToken)

public Task<ICommandResponse<RenameFolderResult>> RenameFolder(RenameFolderArguments args, CancellationToken cancellationToken)

Parameters

args RenameFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<RenameFolderResult>>

RenameSmartFolder(RenameSmartFolderArguments, CancellationToken)

public Task<ICommandResponse<RenameFolderResult>> RenameSmartFolder(RenameSmartFolderArguments args, CancellationToken cancellationToken)

Parameters

args RenameSmartFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<RenameFolderResult>>

SaveSmartFolder(SaveSmartFolderArguments, CancellationToken)

public Task<ICommandResponse<SaveSmartFolderResult>> SaveSmartFolder(SaveSmartFolderArguments args, CancellationToken cancellationToken)

Parameters

args SaveSmartFolderArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<SaveSmartFolderResult>>