libSmalldb  v2.0.2
Public Member Functions | Static Public Member Functions | List of all members
SimpleTransitionGuard Class Reference

Inheritance diagram for SimpleTransitionGuard

Public Member Functions

 __construct (array $transitionPredicates=[], bool $defaultAllow=true)
 
 isTransitionAllowed (ReferenceInterface $ref, TransitionDefinition $transition)
 A simple and cost-effective check whether the transition can be invoked. More...
 
 isAccessAllowed (string $machineType, string $transitionName, ReferenceInterface $ref)
 
 getTransitionPredicates ()
 

Static Public Member Functions

static compileTransitionPredicatesSymfony (SmalldbDefinitionBagInterface $definitionBag, ContainerBuilder $container)
 
static compileTransitionPredicates (SmalldbDefinitionBagInterface $definitionBag, ContainerAdapter $containerAdapter)
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( array  $transitionPredicates = [],
bool  $defaultAllow = true 
)
Parameters

Member Function Documentation

◆ compileTransitionPredicatesSymfony()

static compileTransitionPredicatesSymfony ( SmalldbDefinitionBagInterface  $definitionBag,
ContainerBuilder  $container 
)
static

◆ compileTransitionPredicates()

static compileTransitionPredicates ( SmalldbDefinitionBagInterface  $definitionBag,
ContainerAdapter  $containerAdapter 
)
static
See also
AccessControlExtension $ext
AccessPolicyExtension $policyExt

◆ isTransitionAllowed()

isTransitionAllowed ( ReferenceInterface  $ref,
TransitionDefinition  $transition 
)

A simple and cost-effective check whether the transition can be invoked.

This check is called when we want to know wheter or not we can invoke the transition, but we have no intention of invoking the transition right now (e.g., when rendering a menu with available transitions).

Implements TransitionGuard.

◆ isAccessAllowed()

isAccessAllowed ( string  $machineType,
string  $transitionName,
ReferenceInterface  $ref 
)

◆ getTransitionPredicates()

getTransitionPredicates ( )