ILIAS  release_7 Revision v7.30-3-g800a261c036
Engageable.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2018 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
7use ILIAS\UI\Component\Button\Engageable as EngageableInterface;
8
15{
19 protected $is_engageable = false;
20
24 protected $engaged = false;
25
29 public function isEngageable() : bool
30 {
31 return $this->is_engageable;
32 }
33
37 public function withEngagedState(bool $state) : EngageableInterface
38 {
42 $clone = clone $this;
43 $clone->is_engageable = true;
44 $clone->engaged = $state;
45 return $clone;
46 }
47
51 public function isEngaged() : bool
52 {
53 return $this->engaged;
54 }
55}
An exception for terminatinating execution or to throw for unit testing.
Engageable Components have an "engaged" state and will be displayed accordingly.
Definition: Engageable.php:13