TcfMiddleware
extends AbstractTemplateMiddleware
in package
Middleware to add a tag with label when TCF is required and not active. It also creates an array in `consumerData['tcfVendorConfigurations']` with already created TCF vendor configurations (and their respective ID on the consumer environment).
Table of Contents
Properties
- $consumer : mixed
- $suspended : mixed
Methods
- __construct() : mixed
- C'tor.
- beforePersistTemplate() : void
- Before persisting the template instance to the storage we can modify it.
- beforeRetrievingTemplate() : void
- Before the template got read through `retrieve` or `retrieveBy`.
- beforeUsingTemplate() : void
- Before using the template (e.g. expose it to the frontend UI form) we can modify it.
- getConsumer() : mixed
- Getter.
- getVariableResolver() : mixed
- Getter.
- isSuspended() : mixed
- Check if the middleware is suspended.
- suspend() : mixed
- Allows to suspend or resume the middleware to take effect. This is efficient if a middleware could be called recursively.
Properties
$consumer
private
mixed
$consumer
$suspended
private
mixed
$suspended
= false
Methods
__construct()
C'tor.
public
__construct(ServiceCloudConsumer $consumer) : mixed
Parameters
- $consumer : ServiceCloudConsumer
beforePersistTemplate()
Before persisting the template instance to the storage we can modify it.
public
beforePersistTemplate(mixed $template, mixed &$allTemplates) : void
Example: Calculate recommendedWhenOneOf
.
Parameters
- $template : mixed
- $allTemplates : mixed
beforeRetrievingTemplate()
Before the template got read through `retrieve` or `retrieveBy`.
public
beforeRetrievingTemplate(mixed $template) : void
Parameters
- $template : mixed
beforeUsingTemplate()
Before using the template (e.g. expose it to the frontend UI form) we can modify it.
public
beforeUsingTemplate(mixed $template) : void
Example: Replace variables with values.
Parameters
- $template : mixed
getConsumer()
Getter.
public
getConsumer() : mixed
Tags
getVariableResolver()
Getter.
public
getVariableResolver() : mixed
Tags
isSuspended()
Check if the middleware is suspended.
public
isSuspended() : mixed
suspend()
Allows to suspend or resume the middleware to take effect. This is efficient if a middleware could be called recursively.
public
suspend(bool $state) : mixed
Parameters
- $state : bool