Class ActionConfigurationExtensions
Contains extension methods for action configuration.
public static class ActionConfigurationExtensions
- Inheritance
-
objectActionConfigurationExtensions
Methods
AddActionWithCustomComponent(IList<ActionConfiguration>, AddActionWithCustomComponentParameters)
Adds custom component action.
public static IList<ActionConfiguration> AddActionWithCustomComponent(this IList<ActionConfiguration> configuration, AddActionWithCustomComponentParameters addActionParameters)
Parameters
configurationIList<ActionConfiguration>Action configuration.
addActionParametersAddActionWithCustomComponentParametersAction parameters.
Returns
- IList<ActionConfiguration>
Remarks
Actions with custom component requires to set Kentico.Xperience.Admin.Base.GenerateCustomComponentParameters.Disabled flag when no sufficient permissions are met. Permissions are not automatically checked by used commands as they are part of component implementation.
AddActionWithCustomComponent(IList<ActionConfiguration>, IActionComponent, string, string, string, bool, bool, Action<ActionConfiguration, IDataContainer>)
Adds custom component action.
public static IList<ActionConfiguration> AddActionWithCustomComponent(this IList<ActionConfiguration> configuration, IActionComponent clientComponent, string label, string icon = null, string title = null, bool destructive = false, bool disabled = false, Action<ActionConfiguration, IDataContainer> actionStateEvaluator = null)
Parameters
configurationIList<ActionConfiguration>Action configuration.
clientComponentIActionComponentName of the component to be used. This name is connected with suffix "Component" when loading corresponding frontend component.
labelstringAction label.
iconstringAction icon.
titlestringText of the tooltip.
destructiveboolDestructive action indication.
disabledboolDisabled action.
actionStateEvaluatorAction<ActionConfiguration, IDataContainer>Action used for table action state evaluation per each row.
Returns
- IList<ActionConfiguration>
Remarks
Actions with custom component requires to set disabled flag when no sufficient permissions are met.
Permissions are not automatically checked by used commands as they are part of component implementation.
AddCommand(IList<ActionConfiguration>, AddCommandParameters)
Adds command action.
public static IList<ActionConfiguration> AddCommand(this IList<ActionConfiguration> configuration, AddCommandParameters addCommandParameters)
Parameters
configurationIList<ActionConfiguration>Configuration.
addCommandParametersAddCommandParametersAction parameters.
Returns
- IList<ActionConfiguration>
AddCommand(IList<ActionConfiguration>, string, string, string, string, string, string, bool, Action<ActionConfiguration, IDataContainer>, ComponentContent, Type)
Adds command action.
public static IList<ActionConfiguration> AddCommand(this IList<ActionConfiguration> configuration, string label, string command, string icon = null, string confirmation = null, string confirmationButton = null, string title = null, bool destructive = false, Action<ActionConfiguration, IDataContainer> actionStateEvaluator = null, ComponentContent confirmationContent = null, Type confirmationModel = null)
Parameters
configurationIList<ActionConfiguration>Configuration.
labelstringLabel.
commandstringCommand name.
iconstringIcon.
confirmationstringConfirmation title.
confirmationButtonstringText of the confirmation button.
titlestringText of the tooltip.
destructiveboolDestructive action indication.
actionStateEvaluatorAction<ActionConfiguration, IDataContainer>Action used for table action state evaluation per each row.
confirmationContentComponentContentContent of the confirmation dialog.
confirmationModelTypeModel of form shown in confirmation dialog.
Returns
- IList<ActionConfiguration>
AddCommandWithConfirmation(IList<ActionConfiguration>, AddCommandParameters)
Adds command action with confirmation dialog.
public static IList<ActionConfiguration> AddCommandWithConfirmation(this IList<ActionConfiguration> configuration, AddCommandParameters addCommandParameters)
Parameters
configurationIList<ActionConfiguration>Configuration.
addCommandParametersAddCommandParametersAction parameters.
Returns
- IList<ActionConfiguration>
AddCommandWithConfirmation(IList<ActionConfiguration>, string, string, string, string, string, string, string, bool, Action<ActionConfiguration, IDataContainer>, ComponentContent, Type)
Adds command action with confirmation dialog.
public static IList<ActionConfiguration> AddCommandWithConfirmation(this IList<ActionConfiguration> configuration, string label, string command, string confirmation, string confirmationButton, string confirmationDetail = null, string icon = null, string title = null, bool destructive = false, Action<ActionConfiguration, IDataContainer> actionStateEvaluator = null, ComponentContent confirmationContent = null, Type confirmationModel = null)
Parameters
configurationIList<ActionConfiguration>Configuration.
labelstringLabel.
commandstringCommand name.
confirmationstringConfirmation title.
confirmationButtonstringText of the confirmation button.
confirmationDetailstringConfirmation text.
iconstringIcon.
titlestringText of the tooltip.
destructiveboolDestructive action indication.
actionStateEvaluatorAction<ActionConfiguration, IDataContainer>Action used for table action state evaluation per each row.
confirmationContentComponentContentConfirmation content.
confirmationModelTypeModel of form shown in confirmation dialog.
Returns
- IList<ActionConfiguration>
AddLinkWithConfirmation<TPage>(IList<ActionConfiguration>, AddLinkParameters)
Adds link action with confirmation dialog.
public static IList<ActionConfiguration> AddLinkWithConfirmation<TPage>(this IList<ActionConfiguration> configuration, AddLinkParameters addLinkParameters)
Parameters
configurationIList<ActionConfiguration>Configuration.
addLinkParametersAddLinkParametersAction parameters.
Returns
- IList<ActionConfiguration>
Type Parameters
TPage
AddLinkWithConfirmation<TPage>(IList<ActionConfiguration>, string, string, string, string, string, string, Action<ActionConfiguration, IDataContainer>, PageParameterValues)
Adds link action with confirmation dialog.
public static IList<ActionConfiguration> AddLinkWithConfirmation<TPage>(this IList<ActionConfiguration> configuration, string label, string confirmation, string confirmationButton, string confirmationDetail = null, string icon = null, string title = null, Action<ActionConfiguration, IDataContainer> actionStateEvaluator = null, PageParameterValues parameters = null)
Parameters
configurationIList<ActionConfiguration>Configuration.
labelstringLabel.
confirmationstringConfirmation title.
confirmationButtonstringConfirmation button text.
confirmationDetailstringConfirmation text.
iconstringIcon.
titlestringText of the tooltip.
actionStateEvaluatorAction<ActionConfiguration, IDataContainer>Action used for table action state evaluation per each row.
parametersPageParameterValuesParameter values to be substituted into the URL.
Returns
- IList<ActionConfiguration>
Type Parameters
TPage
AddLinkWithConfirmation<TPage>(IList<ActionConfiguration>, string, string, string, string, string, string, Action<ActionConfiguration, IDataContainer>, params string[])
Adds link action with confirmation dialog.
[Obsolete("Use AddLinkWithConfirmation with PageParameterValues instead.")]
public static IList<ActionConfiguration> AddLinkWithConfirmation<TPage>(this IList<ActionConfiguration> configuration, string label, string confirmation, string confirmationButton, string confirmationDetail = null, string icon = null, string title = null, Action<ActionConfiguration, IDataContainer> actionStateEvaluator = null, params string[] parameters)
Parameters
configurationIList<ActionConfiguration>Configuration.
labelstringLabel.
confirmationstringConfirmation title.
confirmationButtonstringConfirmation button text.
confirmationDetailstringConfirmation text.
iconstringIcon.
titlestringText of the tooltip.
actionStateEvaluatorAction<ActionConfiguration, IDataContainer>Action used for table action state evaluation per each row.
parametersstring[]Parameter values to be substituted into the URL. Provide the parameters in the same order as they would appear in the URL.
Returns
- IList<ActionConfiguration>
Type Parameters
TPage
AddLink<TPage>(IList<ActionConfiguration>, AddLinkParameters)
Adds link action.
public static IList<ActionConfiguration> AddLink<TPage>(this IList<ActionConfiguration> configuration, AddLinkParameters addLinkParameters)
Parameters
configurationIList<ActionConfiguration>Configuration.
addLinkParametersAddLinkParametersAction parameters.
Returns
- IList<ActionConfiguration>
Type Parameters
TPage
AddLink<TPage>(IList<ActionConfiguration>, string, string, string, string, string, Action<ActionConfiguration, IDataContainer>, PageParameterValues)
Adds link action.
public static IList<ActionConfiguration> AddLink<TPage>(this IList<ActionConfiguration> configuration, string label, string icon = null, string confirmation = null, string confirmationButton = null, string title = null, Action<ActionConfiguration, IDataContainer> actionStateEvaluator = null, PageParameterValues parameters = null)
Parameters
configurationIList<ActionConfiguration>Configuration.
labelstringLabel.
iconstringIcon.
confirmationstringConfirmation title.
confirmationButtonstringConfirmation button text.
titlestringText of the tooltip.
actionStateEvaluatorAction<ActionConfiguration, IDataContainer>Action used for table action state evaluation per each row.
parametersPageParameterValuesParameter values to be substituted into the URL.
Returns
- IList<ActionConfiguration>
Type Parameters
TPage
AddLink<TPage>(IList<ActionConfiguration>, string, string, string, string, string, Action<ActionConfiguration, IDataContainer>, params string[])
Adds link action.
[Obsolete("Use AddLink with PageParameterValues instead.")]
public static IList<ActionConfiguration> AddLink<TPage>(this IList<ActionConfiguration> configuration, string label, string icon = null, string confirmation = null, string confirmationButton = null, string title = null, Action<ActionConfiguration, IDataContainer> actionStateEvaluator = null, params string[] parameters)
Parameters
configurationIList<ActionConfiguration>Configuration.
labelstringLabel.
iconstringIcon.
confirmationstringConfirmation title.
confirmationButtonstringConfirmation button text.
titlestringText of the tooltip.
actionStateEvaluatorAction<ActionConfiguration, IDataContainer>Action used for table action state evaluation per each row.
parametersstring[]Parameter values to be substituted into the URL. Provide the parameters in the same order as they would appear in the URL.
Returns
- IList<ActionConfiguration>
Type Parameters
TPage