Documentation

ServiceCloudConsumerExternalUrlNotifierMiddleware extends AbstractConsumerMiddleware
in package

AbstractYes

This is not directly a plugin but a middleware to handle the service cloud consumer `@devowl-wp/service-cloud-consumer`.

This middleware will notify you when an external URL is now covered by a blocker template.

Table of Contents

Properties

$consumer  : mixed
$suspended  : mixed

Methods

__construct()  : mixed
C'tor.
afterDownloadAndPersistFromDataSource()  : void
Teardown of `beforeDownloadAndPersistFromDataSource`. This is also invoked when the database throws the `AbortDataSourceDownloadException` exception.
afterUseTemplate()  : void
Teardown of `beforeDownloadAndPersistFromDataSource`.
alreadyNotified()  : array<string|int, string>
Check if the external URL is already notified. It should return a list of hostnames which are already notified so we do never notify twice.
beforeDownloadAndPersistFromDataSource()  : void
Before downloading from specified datasources. This allows you to e.g. change the language of the context to make translations work as expected.
beforeUseTemplate()  : void
Before using a template and running all the middlewares of `AbstractTemplateMiddleware`.
configure()  : mixed
Configure the headless content blocker before it gets `setup()`.
failedDownloadAndPersistFromDataSource()  : void
The download from a data source failed with an exception.
fetchExternalUrls()  : array<string|int, array<string|int, mixed>>
Fetch external URLs which got found by your scanner.
getConsumer()  : mixed
Getter.
getVariableResolver()  : mixed
Getter.
isSuspended()  : mixed
Check if the middleware is suspended.
notify()  : mixed
Notify the external URL which is now covered by a blocker template.
suspend()  : mixed
Allows to suspend or resume the middleware to take effect. This is efficient if a middleware could be called recursively.
applyAcknowledgementMode()  : mixed
Disallow the creation of a service in the scanner. Additionally, you can add a message to the consumer data which is shown to the user. The user can only acknowledge to the message and not create the service.

Properties

Methods

afterDownloadAndPersistFromDataSource()

Teardown of `beforeDownloadAndPersistFromDataSource`. This is also invoked when the database throws the `AbortDataSourceDownloadException` exception.

public afterDownloadAndPersistFromDataSource(mixed $exception, mixed $blockerTemplates) : void
Parameters
$exception : mixed

null when persist worked as expected, otherwise an Exception

$blockerTemplates : mixed

alreadyNotified()

Check if the external URL is already notified. It should return a list of hostnames which are already notified so we do never notify twice.

public abstract alreadyNotified() : array<string|int, string>
Return values
array<string|int, string>

beforeDownloadAndPersistFromDataSource()

Before downloading from specified datasources. This allows you to e.g. change the language of the context to make translations work as expected.

public beforeDownloadAndPersistFromDataSource() : void

failedDownloadAndPersistFromDataSource()

The download from a data source failed with an exception.

public failedDownloadAndPersistFromDataSource(Exception $exception) : void
Parameters
$exception : Exception

fetchExternalUrls()

Fetch external URLs which got found by your scanner.

public abstract fetchExternalUrls() : array<string|int, array<string|int, mixed>>

Return an array of objects with the following properties:

  • identifier (string): The identifier of the external URL.
  • externalUrl (string): The external URL.
  • markup (string): The markup of the external URL. (optional)
Return values
array<string|int, array<string|int, mixed>>

getVariableResolver()

Getter.

public getVariableResolver() : mixed
Tags
codeCoverageIgnore

isSuspended()

Check if the middleware is suspended.

public isSuspended() : mixed

notify()

Notify the external URL which is now covered by a blocker template.

public abstract notify(array<string|int, ScanEntry$scanEntries) : mixed
Parameters
$scanEntries : array<string|int, ScanEntry>

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

applyAcknowledgementMode()

Disallow the creation of a service in the scanner. Additionally, you can add a message to the consumer data which is shown to the user. The user can only acknowledge to the message and not create the service.

protected applyAcknowledgementMode(AbstractTemplate $template[, array<string|int, string> $paragraphs = [] ][, array<string|int, string> $accordion = null ][, string $buttonLabel = null ][, string $buttonAction = null ]) : mixed
Parameters
$template : AbstractTemplate
$paragraphs : array<string|int, string> = []
$accordion : array<string|int, string> = null

A list of accordions with key as headline and value as message.

$buttonLabel : string = null

The label of the button.

$buttonAction : string = null

The action of the button, can be "ignore", "create" or "close".


        
On this page

Search results