ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Engageable.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
28 trait Engageable
29 {
30  protected bool $is_engageable = false;
31  protected bool $engaged = false;
32 
36  public function isEngageable(): bool
37  {
38  return $this->is_engageable;
39  }
40 
45  public function withEngagedState(bool $state)
46  {
47  $clone = clone $this;
48  $clone->is_engageable = true;
49  $clone->engaged = $state;
50  return $clone;
51  }
52 
56  public function isEngaged(): bool
57  {
58  return $this->engaged;
59  }
60 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21