Documentation

ServiceAvailableBlockerTemplatesMiddleware extends AbstractPoolMiddleware
in package

Middleware to find all content blockers depending on a service and make them available as custom data in a service template.

This is useful to show a dropdown of available content blockers for a service template.

Table of Contents

Properties

$consumer  : mixed
$suspended  : mixed

Methods

__construct()  : mixed
C'tor.
afterPersistTemplatesWithinPool()  : void
After persisting all template instances within a pool.
beforePersistTemplateWithinPool()  : void
Before persisting the template instance when all consumers within a pool got downloaded.
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

Methods

afterPersistTemplatesWithinPool()

After persisting all template instances within a pool.

public afterPersistTemplatesWithinPool(mixed $consumer, mixed &$typeClassToAllTemplates) : void
Parameters
$consumer : mixed
$typeClassToAllTemplates : mixed

Key = type class, value = array of templates

beforePersistTemplateWithinPool()

Before persisting the template instance when all consumers within a pool got downloaded.

public beforePersistTemplateWithinPool(mixed $template, mixed &$typeClassToAllTemplates) : void

Example: Calculate contentBlockerTemplates for ServiceTemplate.

Parameters
$template : mixed
$typeClassToAllTemplates : mixed

Key = type class, value = array of templates

getVariableResolver()

Getter.

public getVariableResolver() : mixed
Tags
codeCoverageIgnore

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

        
On this page

Search results