Table of Contents

Class ContentItemSelectorComponentBase<TProperties>

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

A base class for content item selector form components.

public abstract class ContentItemSelectorComponentBase<TProperties> : FormComponentWithNestedComponents<TProperties, ContentItemSelectorClientProperties, IEnumerable<ContentItemReference>>, IFormComponent, IFormItem<IFormComponentClientProperties>, IFormItem where TProperties : ContentItemSelectorBaseProperties, new()

Type Parameters

TProperties
Inheritance
object
ContentItemSelectorComponentBase<TProperties>
Implements
Derived
Inherited Members
Extension Methods

Remarks

This API supports the framework infrastructure and is not intended to be used directly from your code.

Constructors

ContentItemSelectorComponentBase(IFormComponentCommandInvoker, IFormDataBinder, IAuthenticatedUserAccessor, IContentItemManagerFactory, ILocalizationService, IEventLogService, IFormItemCollectionProvider, IContentLanguageRetriever, IContentItemDisplayNameValidator, IContentItemCommonDataInfoRetriever, IContentItemSelectorItemProvider)

Initializes a new instance of ContentItemSelectorComponentBase<TProperties>.

[Obsolete("Method was not intended for public use and will be removed in the next version.")]
[ObsoleteSince(29, 2)]
public ContentItemSelectorComponentBase(IFormComponentCommandInvoker formComponentCommandInvoker, IFormDataBinder formDataBinder, IAuthenticatedUserAccessor userAccessor, IContentItemManagerFactory contentItemManagerFactory, ILocalizationService localizationService, IEventLogService eventLogService, IFormItemCollectionProvider formItemCollectionProvider, IContentLanguageRetriever contentLanguageRetriever, IContentItemDisplayNameValidator contentItemDisplayNameValidator, IContentItemCommonDataInfoRetriever contentItemCommonDataInfoRetriever, IContentItemSelectorItemProvider selectorItemProvider)

Parameters

formComponentCommandInvoker IFormComponentCommandInvoker
formDataBinder IFormDataBinder
userAccessor IAuthenticatedUserAccessor
contentItemManagerFactory IContentItemManagerFactory
localizationService ILocalizationService
eventLogService IEventLogService
formItemCollectionProvider IFormItemCollectionProvider
contentLanguageRetriever IContentLanguageRetriever
contentItemDisplayNameValidator IContentItemDisplayNameValidator
contentItemCommonDataInfoRetriever IContentItemCommonDataInfoRetriever
selectorItemProvider IContentItemSelectorItemProvider

Methods

ChangeEditContentItemPanelForm(FormChangeCommandArguments, CancellationToken)

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 Task<ICommandResponse<FormChangeResult>> ChangeEditContentItemPanelForm(FormChangeCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args FormChangeCommandArguments

Form change arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<FormChangeResult>>

Returns the form change result.

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.

ConfirmSelection(ContentItemSubmissionCommandArguments, CancellationToken)

Confirms the selection of content item creation parameters.

public Task<ICommandResponse> ConfirmSelection(ContentItemSubmissionCommandArguments args, CancellationToken cancellationToken)

Parameters

args ContentItemSubmissionCommandArguments

Confirm selection form command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse>

Create(ContentItemSubmissionCommandArguments, CancellationToken)

Creates a content item based on args and returns a created content item data.

public Task<ICommandResponse> Create(ContentItemSubmissionCommandArguments args, CancellationToken cancellationToken)

Parameters

args ContentItemSubmissionCommandArguments

Submission arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse>

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

Creates a reusable content item based on provided parameters.

protected virtual 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.

GetContentTypeSelectionModel()

Returns the model object for the content type selection form.

protected abstract object GetContentTypeSelectionModel()

Returns

object

GetNestedFormItems()

Returns the form items that are used within the nested form.

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

Returns

Task<ICollection<IFormItem>>

GetSelectionModel()

Returns model class for the form.

[Obsolete("Method was not intended for public use and will be removed in the next version.")]
[ObsoleteSince(30, 0)]
protected virtual object GetSelectionModel()

Returns

object

InitializeNestedContext()

Initializes form context within the nested form.

protected override Task<IFormContext> InitializeNestedContext()

Returns

Task<IFormContext>

LoadContentItemPanelItems(LoadContentItemPanelItemsCommandArguments, CancellationToken)

Loads content item panel items.

public Task<ICommandResponse<LoadContentItemPanelItemsResult>> LoadContentItemPanelItems(LoadContentItemPanelItemsCommandArguments args, CancellationToken cancellationToken)

Parameters

args LoadContentItemPanelItemsCommandArguments
cancellationToken CancellationToken

Returns

Task<ICommandResponse<LoadContentItemPanelItemsResult>>

LoadFormItems(ContentItemCommandParameters, CancellationToken)

Loads form items.

public Task<ICommandResponse> LoadFormItems(ContentItemCommandParameters args, CancellationToken cancellationToken)

Parameters

args ContentItemCommandParameters
cancellationToken CancellationToken

Returns

Task<ICommandResponse>

Publish(ContentItemSubmissionCommandArguments, CancellationToken)

Publishes the content item.

public Task<ICommandResponse> Publish(ContentItemSubmissionCommandArguments args, CancellationToken cancellationToken)

Parameters

args ContentItemSubmissionCommandArguments

Publish content item command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse>

ValidateDisplayName(RenameCommandArguments)

Validates the content item display name.

public Task<ICommandResponse<RenameCommandResult>> ValidateDisplayName(RenameCommandArguments args)

Parameters

args RenameCommandArguments

Rename command arguments.

Returns

Task<ICommandResponse<RenameCommandResult>>