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

Description

Dummy transition guard that allows everything.

Inheritance diagram for AllowingTransitionGuard

Public Member Functions

 __construct (bool $allowEverything=true)
 
 isTransitionAllowed (ReferenceInterface $ref, TransitionDefinition $transition)
 A simple and cost-effective check whether the transition can be invoked. More...
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( bool  $allowEverything = true)

Member Function Documentation

◆ 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.