ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Forum\Posting\BindingDecision Class Reference
+ Collaboration diagram for ILIAS\Forum\Posting\BindingDecision:

Public Member Functions

 isGranted ()
 
 denialReason ()
 

Static Public Member Functions

static granted ()
 
static denied (BindingDenial $reason)
 

Private Member Functions

 __construct (private bool $granted, private ?BindingDenial $reason)
 

Detailed Description

Definition at line 25 of file BindingDecision.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Forum\Posting\BindingDecision::__construct ( private bool  $granted,
private ?BindingDenial  $reason 
)
private

Definition at line 27 of file BindingDecision.php.

30 {
31 }

Member Function Documentation

◆ denialReason()

ILIAS\Forum\Posting\BindingDecision::denialReason ( )

Definition at line 48 of file BindingDecision.php.

49 {
50 if ($this->reason === null) {
51 throw new LogicException('A granted decision does not carry a denial reason');
52 }
53
54 return $this->reason;
55 }

◆ denied()

static ILIAS\Forum\Posting\BindingDecision::denied ( BindingDenial  $reason)
static

◆ granted()

static ILIAS\Forum\Posting\BindingDecision::granted ( )
static

Definition at line 33 of file BindingDecision.php.

33 : self
34 {
35 return new self(true, null);
36 }

Referenced by ILIAS\Forum\Posting\PostingBindingGuard\decide(), ILIAS\Forum\Posting\DraftBindingGuard\decideUnboundThread(), and ILIAS\Forum\Posting\Test\BindingDecisionTest\testGrantedDecisionRefusesToNameADenialReason().

+ Here is the caller graph for this function:

◆ isGranted()

ILIAS\Forum\Posting\BindingDecision::isGranted ( )

Definition at line 43 of file BindingDecision.php.

43 : bool
44 {
45 return $this->granted;
46 }

Referenced by ilObjForumGUI\denyUnlessGranted().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: