Class ContentItemSelectorComponent
Represents content item selector form component.
[ComponentAttribute(typeof(ContentItemSelectorComponentAttribute))]
public sealed class ContentItemSelectorComponent : ContentItemSelectorComponentBase<ContentItemSelectorProperties>, IFormComponent, IFormItem<IFormComponentClientProperties>, IFormItem
- Inheritance
-
objectFormComponent<ContentItemSelectorProperties, ContentItemSelectorClientProperties, IEnumerable<ContentItemReference>>FormComponentWithNestedComponents<ContentItemSelectorProperties, ContentItemSelectorClientProperties, IEnumerable<ContentItemReference>>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
formComponentCommandInvokerIFormComponentCommandInvokerformDataBinderIFormDataBinderuserAccessorIAuthenticatedUserAccessorcontentItemManagerFactoryIContentItemManagerFactorylocalizationServiceILocalizationServiceeventLogServiceIEventLogServiceformItemCollectionProviderIFormItemCollectionProvidercontentLanguageRetrieverIContentLanguageRetrievercontentItemDisplayNameValidatorIContentItemDisplayNameValidatorserviceProviderIServiceProvider
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.
[FormComponentCommand]
public Task<ICommandResponse<FilterFormChangeResult>> Change(FormSubmissionCommandArguments args, CancellationToken cancellationToken = default)
Parameters
argsFormSubmissionCommandArgumentscancellationTokenCancellationToken
Returns
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.
[FormComponentCommand]
public Task<ICommandResponse<FilterFormChangeResult>> ChangeCreateSmartFolderForm(FormSubmissionCommandArguments args, CancellationToken cancellationToken = default)
Parameters
argsFormSubmissionCommandArgumentscancellationTokenCancellationToken
Returns
CloneSmartFolder(CloneSmartFolderArguments, CancellationToken)
Routes the command to the CloneSmartFolder(CloneSmartFolderArguments, int, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<CloneSmartFolderResult>> CloneSmartFolder(CloneSmartFolderArguments args, CancellationToken cancellationToken)
Parameters
argsCloneSmartFolderArgumentscancellationTokenCancellationToken
Returns
ConfigureClientProperties(ContentItemSelectorClientProperties)
Configures the form component client properties.
protected override Task ConfigureClientProperties(ContentItemSelectorClientProperties clientProperties)
Parameters
clientPropertiesContentItemSelectorClientPropertiesThe 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
argsContentItemSubmissionCommandArgumentsSubmission arguments.
languageNamestringLanguage code name.
versionStatusVersionStatusVersion status.
dataContentItemDataContent item data retrieved from form.
cancellationTokenCancellationTokenCancellation 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)
Routes the command to the CreateFolder(CreateFolderArguments, int, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<CreateFolderResult>> CreateFolder(CreateFolderArguments args, CancellationToken cancellationToken)
Parameters
argsCreateFolderArgumentscancellationTokenCancellationToken
Returns
CreateSmartFolder(CreateSmartFolderArguments, CancellationToken)
Routes the command to the CreateSmartFolder(CreateSmartFolderArguments, int, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<CreateSmartFolderResult>> CreateSmartFolder(CreateSmartFolderArguments args, CancellationToken cancellationToken)
Parameters
argsCreateSmartFolderArgumentscancellationTokenCancellationToken
Returns
CreateSmartFolderConfirmFilter(CreateSmartFolderConfirmFilterArguments, CancellationToken)
Routes the command to the CreateSmartFolderConfirmFilter(CreateSmartFolderConfirmFilterArguments, CancellationToken, int?, bool) method.
[FormComponentCommand]
public Task<ICommandResponse<CreateSmartFolderConfirmFilterResult>> CreateSmartFolderConfirmFilter(CreateSmartFolderConfirmFilterArguments args, CancellationToken cancellationToken)
Parameters
argsCreateSmartFolderConfirmFilterArgumentscancellationTokenCancellationToken
Returns
DoesFilterSupportDelivery(FilterDeliverySupportArguments, CancellationToken)
Routes the command to the DoesFilterSupportDelivery(FilterDeliverySupportArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<FilterDeliverySupportResult>> DoesFilterSupportDelivery(FilterDeliverySupportArguments args, CancellationToken cancellationToken)
Parameters
argsFilterDeliverySupportArgumentscancellationTokenCancellationToken
Returns
EnableContentDeliveryForSmartFolder(EnableContentDeliveryForSmartFolderArguments, CancellationToken)
Routes the command to the EnableContentDeliveryForSmartFolder(EnableContentDeliveryForSmartFolderArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse> EnableContentDeliveryForSmartFolder(EnableContentDeliveryForSmartFolderArguments args, CancellationToken cancellationToken)
Parameters
argsEnableContentDeliveryForSmartFolderArgumentscancellationTokenCancellationToken
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.
[FormComponentCommand]
public Task<ICommandResponse<Folder>> GetFolder(GetFolderArguments args, CancellationToken cancellationToken)
Parameters
argsGetFolderArgumentscancellationTokenCancellationToken
Returns
- Task<ICommandResponse<Folder>>
GetFolderPath(GetFolderArguments, CancellationToken)
Routes the command to the GetFolderPath(GetFolderArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<ICollection<Folder>>> GetFolderPath(GetFolderArguments args, CancellationToken cancellationToken)
Parameters
argsGetFolderArgumentscancellationTokenCancellationToken
Returns
- Task<ICommandResponse<ICollection<Folder>>>
GetFolderSubtree(GetFolderArguments, CancellationToken)
Routes the command to the GetFolderSubtree(GetFolderArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<Folder>> GetFolderSubtree(GetFolderArguments args, CancellationToken cancellationToken)
Parameters
argsGetFolderArgumentscancellationTokenCancellationToken
Returns
- Task<ICommandResponse<Folder>>
GetFormItemsForCloneSmartFolder(GetFormItemsArguments, CancellationToken)
Routes the command to the GetFormItemsForCloneSmartFolder(GetFormItemsArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForCloneSmartFolder(GetFormItemsArguments args, CancellationToken cancellationToken)
Parameters
argsGetFormItemsArgumentscancellationTokenCancellationToken
Returns
GetFormItemsForCreateFolder(GetFormItemsArguments, CancellationToken)
Routes the command to the GetFormItemsForCreateFolder(GetFormItemsArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForCreateFolder(GetFormItemsArguments args, CancellationToken cancellationToken)
Parameters
argsGetFormItemsArgumentscancellationTokenCancellationToken
Returns
GetFormItemsForCreateSmartFolder(CancellationToken)
Routes the command to the Kentico.Xperience.Admin.Base.ISmartFolderCommandManager.GetFormItemsForCreateSmartFolder(System.Threading.CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetFormItemsForCreateSmartFolderResult>> GetFormItemsForCreateSmartFolder(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken
Returns
GetFormItemsForMoveFolder(GetFormItemsArguments, CancellationToken)
Routes the command to the GetFormItemsForMoveFolder(GetFormItemsArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForMoveFolder(GetFormItemsArguments args, CancellationToken cancellationToken)
Parameters
argsGetFormItemsArgumentscancellationTokenCancellationToken
Returns
GetFormItemsForRenameFolder(GetFormItemsArguments, CancellationToken)
Routes the command to the GetFormItemsForRenameFolder(GetFormItemsArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForRenameFolder(GetFormItemsArguments args, CancellationToken cancellationToken)
Parameters
argsGetFormItemsArgumentscancellationTokenCancellationToken
Returns
GetFormItemsForRenameSmartFolder(GetFormItemsArguments, CancellationToken)
Routes the command to the GetFormItemsForRenameSmartFolder(GetFormItemsArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForRenameSmartFolder(GetFormItemsArguments args, CancellationToken cancellationToken)
Parameters
argsGetFormItemsArgumentscancellationTokenCancellationToken
Returns
GetFormItemsForSaveSmartFolder(CancellationToken)
Routes the command to the Kentico.Xperience.Admin.Base.ISmartFolderCommandManager.GetFormItemsForSaveSmartFolder(System.Threading.CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetFormItemsResult>> GetFormItemsForSaveSmartFolder(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken
Returns
GetListingConfiguration(LoadListingConfigurationCommandArguments)
Returns listing configuration.
[FormComponentCommand]
public Task<ICommandResponse<LoadListingConfigurationCommandResult>> GetListingConfiguration(LoadListingConfigurationCommandArguments args)
Parameters
Returns
GetNestedFormItems()
Initializes form context within the nested form.
protected override Task<ICollection<IFormItem>> GetNestedFormItems()
Returns
- Task<ICollection<IFormItem>>
GetSmartFolderFilter(GetSmartFolderFilterArguments, CancellationToken)
Routes the command to the GetSmartFolderFilter(GetSmartFolderFilterArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetSmartFolderFilterResult>> GetSmartFolderFilter(GetSmartFolderFilterArguments args, CancellationToken cancellationToken)
Parameters
argsGetSmartFolderFilterArgumentscancellationTokenCancellationToken
Returns
GetSmartFolders(GetSmartFoldersArguments, CancellationToken)
Routes the command to the GetSmartFolders(GetSmartFoldersArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<GetSmartFoldersResult>> GetSmartFolders(GetSmartFoldersArguments args, CancellationToken cancellationToken)
Parameters
argsGetSmartFoldersArgumentscancellationTokenCancellationToken
Returns
IsSmartFolderDeliverySupported(SmartFolderDeliverySupportArguments, CancellationToken)
Routes the command to the IsSmartFolderDeliverySupported(SmartFolderDeliverySupportArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<SmartFolderDeliverySupportResult>> IsSmartFolderDeliverySupported(SmartFolderDeliverySupportArguments args, CancellationToken cancellationToken)
Parameters
argsSmartFolderDeliverySupportArgumentscancellationTokenCancellationToken
Returns
LoadSelectorData(LoadSelectorDataCommandArguments, CancellationToken)
Loads data for the content item selector.
[FormComponentCommand]
public Task<ICommandResponse<LoadDataResult>> LoadSelectorData(LoadSelectorDataCommandArguments args, CancellationToken cancellationToken)
Parameters
argsLoadSelectorDataCommandArgumentscancellationTokenCancellationToken
Returns
- Task<ICommandResponse<LoadDataResult>>
MassMove(IEnumerable<int>, MoveContentItemModel, CancellationToken)
Moves multiple content items to a folder specified by the model.
[FormComponentCommand(CommandName = "MassMove")]
public Task<ICommandResponse<MassActionResult>> MassMove(IEnumerable<int> identifiers, MoveContentItemModel model, CancellationToken cancellationToken)
Parameters
identifiersIEnumerable<int>IDs of the content items to be moved.
modelMoveContentItemModelModel describing where to move the content items.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<ICommandResponse<MassActionResult>>
MoveContentItem(int, MoveContentItemModel, CancellationToken)
Moves a content item to a folder specified by the model.
[FormComponentCommand]
public Task<ICommandResponse<RowActionResult>> MoveContentItem(int id, MoveContentItemModel model, CancellationToken cancellationToken)
Parameters
idintID of the content item to be moved.
modelMoveContentItemModelModel describing where to move the content item.
cancellationTokenCancellationTokenCancellation instruction.
Returns
- Task<ICommandResponse<RowActionResult>>
MoveFolder(MoveFolderArguments, CancellationToken)
Routes the command to the MoveFolder(MoveFolderArguments, int, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<MoveFolderResult>> MoveFolder(MoveFolderArguments args, CancellationToken cancellationToken)
Parameters
argsMoveFolderArgumentscancellationTokenCancellationToken
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.
[FormComponentCommand]
public Task<ICommandResponse<FormChangeResult>> MoveItemFormChange(FormChangeCommandArguments args, CancellationToken cancellationToken)
Parameters
argsFormChangeCommandArgumentsForm change command arguments.
cancellationTokenCancellationTokenCancellation instruction.
Returns
- Task<ICommandResponse<FormChangeResult>>
RenameFolder(RenameFolderArguments, CancellationToken)
Routes the command to the RenameFolder(RenameFolderArguments, int, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<RenameFolderResult>> RenameFolder(RenameFolderArguments args, CancellationToken cancellationToken)
Parameters
argsRenameFolderArgumentscancellationTokenCancellationToken
Returns
RenameSmartFolder(RenameSmartFolderArguments, CancellationToken)
Routes the command to the RenameSmartFolder(RenameSmartFolderArguments, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<RenameFolderResult>> RenameSmartFolder(RenameSmartFolderArguments args, CancellationToken cancellationToken)
Parameters
argsRenameSmartFolderArgumentscancellationTokenCancellationToken
Returns
SaveSmartFolder(SaveSmartFolderArguments, CancellationToken)
Routes the command to the SaveSmartFolder(SaveSmartFolderArguments, int, CancellationToken) method.
[FormComponentCommand]
public Task<ICommandResponse<SaveSmartFolderResult>> SaveSmartFolder(SaveSmartFolderArguments args, CancellationToken cancellationToken)
Parameters
argsSaveSmartFolderArgumentscancellationTokenCancellationToken