Class CreateLanguageVariant
Page for creating a new web page language variant.
[UIEvaluatePermission("View")]
[UINavigation(false)]
public sealed class CreateLanguageVariant : CreateWebPageBase<CreateLanguageVariantCreateCommandResult, CreateLanguageVariantModel>, IPage
- Inheritance
-
objectCreateLanguageVariant
- 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
authenticatedUserAccessorIAuthenticatedUserAccessorwebPageManagerFactoryIWebPageManagerFactoryformComponentCommandInvokerIFormComponentCommandInvokerpageLinkGeneratorIPageLinkGeneratorcontentItemDisplayNameValidatorIContentItemDisplayNameValidatorcontentItemCommonDataInfoRetrieverIContentItemCommonDataInfoRetrieverwebPageItemInfoProviderIInfoProvider<WebPageItemInfo>contentItemLanguageRetrieverIContentLanguageRetrievercontentItemUIDataRetrieverIContentItemUIDataRetrieverserviceProviderIServiceProvider
Properties
WebPageIdentifier
Web page identifier composed from culture code and node ID.
[PageParameter(typeof(WebPageUrlIdentifierPageModelBinder), typeof(WebPageLayout))]
public WebPageUrlIdentifier WebPageIdentifier { get; set; }
Property Value
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
argsCreateWebPageCreateCommandArgumentsCreate web page command arguments.
cancellationTokenCancellationTokenCancellation 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
argsCreateWebPageCreateCommandArgumentsForm change arguments.
cancellationTokenCancellationTokenCancellation 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
argsCreateWebPageCreateCommandArgumentsCreate web page command arguments.
cancellationTokenCancellationTokenCancellation 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
propertiesCreateWebPageClientPropertiesInitialized properties object.
Returns
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
argsCreateWebPageCreateCommandArgumentsCreate web page command arguments.
cancellationTokenCancellationTokenCancellation instruction.
Returns
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
argsCreateWebPageCreateCommandArgumentsForm submission arguments.
formComponentsList<IFormComponent>Form components.
publishboolIndicates whether the web page should also be immediately published.
cancellationTokenCancellationTokenCancellation instruction.
Returns
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
webPageIdintWeb page identifier.
Returns
- string
GetPublishPageUrl(int)
Returns publish page URL for given webPageId.
protected override string GetPublishPageUrl(int webPageId)
Parameters
webPageIdintWeb page identifier.
Returns
- string
GetUrlComponents(CreateWebPageCreateCommandArguments, bool)
Gets URL slug edit components.
protected override Task<ICollection<IFormItem>> GetUrlComponents(CreateWebPageCreateCommandArguments args, bool useExistingValue)
Parameters
argsCreateWebPageCreateCommandArgumentsCreate web page command arguments.
useExistingValueboolIndicates 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
argsCreateWebPageCreateCommandArgumentsCreate web page command arguments.
cancellationTokenCancellationTokenCancellation instruction.
Returns
SubmitFirstStep(FormSubmissionCommandArguments, CancellationToken)
Confirms the selection of web page parameters.
[PageCommand(CommandName = "ConfirmFirstSelection", Permission = "View")]
public override Task<ICommandResponse> SubmitFirstStep(FormSubmissionCommandArguments args, CancellationToken cancellationToken = default)
Parameters
argsFormSubmissionCommandArgumentsConfirm selection form command arguments.
cancellationTokenCancellationTokenCancellation instruction.
Returns
- Task<ICommandResponse>
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
argsCreateWebPageCreateCommandArgumentsSelected data form command arguments.
cancellationTokenCancellationTokenCancellation instruction.
Returns
ValidateDisplayName(RenameCommandArguments)
Validates the content item display name.
[PageCommand(CommandName = "ValidateDisplayName", Permission = "View")]
public override Task<ICommandResponse<RenameCommandResult>> ValidateDisplayName(RenameCommandArguments args)
Parameters
argsRenameCommandArgumentsRename command arguments.
Returns
ValidatePage()
Validates the page state prior invocation of the ConfigurePage() method.
public override Task<PageValidationResult> ValidatePage()
Returns
- Task<PageValidationResult>