ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilBuddySystemRelationStateInitiatorShouldOnlyBeAbleToCancelRequestRule.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Contact/BuddySystem/classes/states/class.ilBuddySystemRelationStateFilterRule.php';
5
11{
15 public function matches()
16 {
17 if(!$this->relation->isRequested())
18 {
19 return false;
20 }
21
22 if(!$this->relation->isOwnedByRequest())
23 {
24 return false;
25 }
26
27 return true;
28 }
29
34 public function __invoke(ilBuddySystemRelationState $state)
35 {
36 if($state instanceof ilBuddySystemUnlinkedRelationState)
37 {
38 return true;
39 }
40
41 return false;
42 }
43}
Interface ilBuddySystemRelationState.