Class PublishingFunctionProcessor
Function processor for publishing page transformation
Inherited Members
Namespace: PnP.Framework.Modernization.Publishing
Assembly: PnP.Framework.dll
Syntax
public class PublishingFunctionProcessor : BaseFunctionProcessor
Constructors
PublishingFunctionProcessor(ListItem, ClientContext, ClientContext, PublishingPageTransformation, BaseTransformationInformation, IList<ILogObserver>)
Default constructor
Declaration
public PublishingFunctionProcessor(ListItem page, ClientContext sourceClientContext, ClientContext targetClientContext, PublishingPageTransformation publishingPageTransformation, BaseTransformationInformation baseTransformationInformation, IList<ILogObserver> logObservers = null)
Parameters
ListItem
page
Page to operate on |
ClientContext
sourceClientContext
Clientcontext of the source site |
ClientContext
targetClientContext
Clientcontext of the target site |
PublishingPageTransformation
publishingPageTransformation
Publishing page layout mapping |
BaseTransformationInformation
baseTransformationInformation
Page transformation information |
IList<ILogObserver>
logObservers
Connected loggers |
Properties
NameAttributeToken
Name token
Declaration
public string NameAttributeToken { get; }
Property Value
System.String
|
Methods
Process(String, String, PublishingFunctionProcessor.FieldType)
Executes a function and returns results
Declaration
public Tuple<string, string> Process(string functions, string propertyName, PublishingFunctionProcessor.FieldType propertyType)
Parameters
System.String
functions
Function to process |
System.String
propertyName
Field/property the function runs on |
PublishingFunctionProcessor.FieldType
propertyType
Type of the field/property the function will run on |
Returns
Tuple<System.String, System.String>
Function output |
ResolveFunctionToken(String, String)
Replaces instances of the NameAttributeToken with the provided PropertyName
Declaration
public string ResolveFunctionToken(string functions, string propertyName)
Parameters
System.String
functions
A string value containing the function definition |
System.String
propertyName
The property to replace it with |
Returns
System.String
The newly formatted function value. |