Class CreateWebPage
Page for creating a new web page.
[UIEvaluatePermission("View")]
[UINavigation(false)]
public sealed class CreateWebPage : CreateWebPageBase<CreateWebPageCreateCommandResult, ContentTypeSelectionModel>, IPage
- Inheritance
-
objectCreateWebPage
- Implements
- Inherited Members
- Extension Methods
Constructors
CreateWebPage(IFormComponentCommandInvoker, IAuthenticatedUserAccessor, IWebPageManagerFactory, IPageLinkGenerator, IContentItemDisplayNameValidator, IServiceProvider)
Initializes an instance of the CreateWebPage class.
public CreateWebPage(IFormComponentCommandInvoker formComponentCommandInvoker, IAuthenticatedUserAccessor authenticatedUserAccessor, IWebPageManagerFactory webPageManagerFactory, IPageLinkGenerator pageLinkGenerator, IContentItemDisplayNameValidator contentItemDisplayNameValidator, IServiceProvider serviceProvider)
Parameters
formComponentCommandInvokerIFormComponentCommandInvokerauthenticatedUserAccessorIAuthenticatedUserAccessorwebPageManagerFactoryIWebPageManagerFactorypageLinkGeneratorIPageLinkGeneratorcontentItemDisplayNameValidatorIContentItemDisplayNameValidatorserviceProviderIServiceProvider
Methods
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<CreateWebPageCreateCommandResult>> 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<CreateWebPageCreateCommandResult>> 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 parent page.
[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<CreateWebPageCreateCommandResult>> 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.