ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilBuddySystemRelationStateReceiverShouldNotBeAbleToCancelRequestRule.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9{
13 public function matches() : bool
14 {
15 if (!$this->relation->isRequested()) {
16 return false;
17 }
18
19 if ($this->relation->isOwnedByActor()) {
20 return false;
21 }
22
23 return true;
24 }
25
29 public function __invoke(ilBuddySystemRelationState $state) : bool
30 {
31 if ($state instanceof ilBuddySystemUnlinkedRelationState) {
32 return false;
33 }
34
35 return true;
36 }
37}
An exception for terminatinating execution or to throw for unit testing.
Interface ilBuddySystemRelationState.