Table of Contents

Class CreateLanguageVariant

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

Page for creating a new web page language variant.

[UIEvaluatePermission("View")]
[UINavigation(false)]
public sealed class CreateLanguageVariant : CreateWebPageBase<CreateLanguageVariantCreateCommandResult, CreateLanguageVariantModel>, IPage
Inheritance
object
CreateLanguageVariant
Implements
Extension Methods

Constructors

CreateLanguageVariant(IAuthenticatedUserAccessor, IWebPageManagerFactory, IFormComponentCommandInvoker, IPageLinkGenerator, IContentItemDisplayNameValidator, IContentItemCommonDataInfoRetriever, IInfoProvider<WebPageItemInfo>, IContentLanguageRetriever, IContentItemUIDataRetriever, IServiceProvider)

Initializes an instance of the CreateLanguageVariant class.

public CreateLanguageVariant(IAuthenticatedUserAccessor authenticatedUserAccessor, IWebPageManagerFactory webPageManagerFactory, IFormComponentCommandInvoker formComponentCommandInvoker, IPageLinkGenerator pageLinkGenerator, IContentItemDisplayNameValidator contentItemDisplayNameValidator, IContentItemCommonDataInfoRetriever contentItemCommonDataInfoRetriever, IInfoProvider<WebPageItemInfo> webPageItemInfoProvider, IContentLanguageRetriever contentItemLanguageRetriever, IContentItemUIDataRetriever contentItemUIDataRetriever, IServiceProvider serviceProvider)

Parameters

authenticatedUserAccessor IAuthenticatedUserAccessor
webPageManagerFactory IWebPageManagerFactory
formComponentCommandInvoker IFormComponentCommandInvoker
pageLinkGenerator IPageLinkGenerator
contentItemDisplayNameValidator IContentItemDisplayNameValidator
contentItemCommonDataInfoRetriever IContentItemCommonDataInfoRetriever
webPageItemInfoProvider IInfoProvider<WebPageItemInfo>
contentItemLanguageRetriever IContentLanguageRetriever
contentItemUIDataRetriever IContentItemUIDataRetriever
serviceProvider IServiceProvider

Properties

WebPageIdentifier

Web page identifier composed from culture code and node ID.

[PageParameter(typeof(WebPageUrlIdentifierPageModelBinder), typeof(WebPageLayout))]
public WebPageUrlIdentifier WebPageIdentifier { get; set; }

Property Value

WebPageUrlIdentifier

Methods

CascadePublish(CreateWebPageCreateCommandArguments, CancellationToken)

Creates new web page and redirects to the publish page.

[Obsolete("Use Publish command instead.")]
[PageCommand(CommandName = "CascadePublish", Permission = "View")]
public override Task<ICommandResponse> CascadePublish(CreateWebPageCreateCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args CreateWebPageCreateCommandArguments

Create web page command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse>

Change(CreateWebPageCreateCommandArguments, 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.

[PageCommand(Permission = "View")]
public override Task<ICommandResponse<FormChangeResult>> Change(CreateWebPageCreateCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args CreateWebPageCreateCommandArguments

Form change arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<FormChangeResult>>

ChangeWorkflowStep(CreateWebPageCreateCommandArguments, CancellationToken)

Create a new web page language variant as the initial draft and redirects to the change workflow step UI.

[PageCommand(CommandName = "ChangeWorkflowStep", Permission = "View")]
public override Task<ICommandResponse> ChangeWorkflowStep(CreateWebPageCreateCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args CreateWebPageCreateCommandArguments

Create web page command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse>

ConfigurePage()

Allows configure and share page specific values prior invocation of the ConfigureTemplateProperties(TClientProperties) or command method.

public override Task ConfigurePage()

Returns

Task

ConfigureTemplateProperties(CreateWebPageClientProperties)

Gets the object representing client side template properties.

public override Task<CreateWebPageClientProperties> ConfigureTemplateProperties(CreateWebPageClientProperties properties)

Parameters

properties CreateWebPageClientProperties

Initialized properties object.

Returns

Task<CreateWebPageClientProperties>

Create(CreateWebPageCreateCommandArguments, CancellationToken)

Creates the web page language variant.

[PageCommand(CommandName = "Create", Permission = "View")]
public override Task<ICommandResponse<CreateLanguageVariantCreateCommandResult>> Create(CreateWebPageCreateCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args CreateWebPageCreateCommandArguments

Create web page command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<CreateLanguageVariantCreateCommandResult>>

CreateInternal(CreateWebPageCreateCommandArguments, List<IFormComponent>, bool, CancellationToken)

Creates the web page and returns response.

protected override Task<ICommandResponse<CreateLanguageVariantCreateCommandResult>> CreateInternal(CreateWebPageCreateCommandArguments args, List<IFormComponent> formComponents, bool publish, CancellationToken cancellationToken = default)

Parameters

args CreateWebPageCreateCommandArguments

Form submission arguments.

formComponents List<IFormComponent>

Form components.

publish bool

Indicates whether the web page should also be immediately published.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<CreateLanguageVariantCreateCommandResult>>

Discard()

Discards the unsaved draft of web page and redirects back to the create language variant.

[PageCommand(CommandName = "Discard", Permission = "View")]
public Task<INavigateResponse> Discard()

Returns

Task<INavigateResponse>

GetChangeWorkflowStepPageUrl(int)

Returns change workflow step page URL for given webPageId.

protected override string GetChangeWorkflowStepPageUrl(int webPageId)

Parameters

webPageId int

Web page identifier.

Returns

string

GetPublishPageUrl(int)

Returns publish page URL for given webPageId.

protected override string GetPublishPageUrl(int webPageId)

Parameters

webPageId int

Web page identifier.

Returns

string

GetUrlComponents(CreateWebPageCreateCommandArguments, bool)

Gets URL slug edit components.

protected override Task<ICollection<IFormItem>> GetUrlComponents(CreateWebPageCreateCommandArguments args, bool useExistingValue)

Parameters

args CreateWebPageCreateCommandArguments

Create web page command arguments.

useExistingValue bool

Indicates if the URL slug component should be pre-filled with existing value.

Returns

Task<ICollection<IFormItem>>

Publish(CreateWebPageCreateCommandArguments, CancellationToken)

Creates new web page and redirects to the publish page.

[PageCommand(CommandName = "Publish", Permission = "View")]
public override Task<ICommandResponse<CreateLanguageVariantCreateCommandResult>> Publish(CreateWebPageCreateCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args CreateWebPageCreateCommandArguments

Create web page command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<CreateLanguageVariantCreateCommandResult>>

SubmitFirstStep(FormSubmissionCommandArguments, CancellationToken)

Confirms the selection of web page parameters.

[PageCommand(CommandName = "ConfirmFirstSelection", Permission = "View")]
public override Task<ICommandResponse<ICreateWebPageStepCommandResult>> SubmitFirstStep(FormSubmissionCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args FormSubmissionCommandArguments

Confirm selection form command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<ICreateWebPageStepCommandResult>>

SubmitSecondStep(CreateWebPageCreateCommandArguments, CancellationToken)

Confirms the selection of web page parameters.

[PageCommand(CommandName = "ConfirmSecondSelection", Permission = "View")]
public override Task<ICommandResponse<ICreateWebPageStepCommandResult>> SubmitSecondStep(CreateWebPageCreateCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args CreateWebPageCreateCommandArguments

Selected data form command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<ICreateWebPageStepCommandResult>>

ValidateDisplayName(RenameCommandArguments)

Validates the content item display name.

[PageCommand(CommandName = "ValidateDisplayName", Permission = "View")]
public override Task<ICommandResponse<RenameCommandResult>> ValidateDisplayName(RenameCommandArguments args)

Parameters

args RenameCommandArguments

Rename command arguments.

Returns

Task<ICommandResponse<RenameCommandResult>>

ValidatePage()

Validates the page state prior invocation of the ConfigurePage() method.

public override Task<PageValidationResult> ValidatePage()

Returns

Task<PageValidationResult>