ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Bulky.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2017 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
5
7
11class Bulky extends Button implements C\Button\Bulky
12{
13
17 protected $icon_or_glyph;
18
22 protected $engaged = false;
23
25 {
26 $allowed_classes = [C\Icon\Icon::class, C\Glyph\Glyph::class];
27 $graphical_param = array($icon_or_glyph);
28 $this->checkArgListElements("icon_or_glyph", $graphical_param, $allowed_classes);
29 $this->checkStringArg("label", $label);
30 $this->checkStringArg("action", $action);
31 $this->icon_or_glyph = $icon_or_glyph;
32 $this->label = $label;
33 $this->action = $action;
34 }
35
39 public function getIconOrGlyph()
40 {
42 }
43
47 public function withEngagedState($state)
48 {
49 $this->checkBoolArg("state", $state);
50 $clone = clone $this;
51 $clone->engaged = $state;
52 return $clone;
53 }
54
58 public function isEngaged()
59 {
60 return $this->engaged;
61 }
62}
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
An exception for terminatinating execution or to throw for unit testing.
__construct($icon_or_glyph, $label, $action)
Definition: Bulky.php:24
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
checkArgListElements($which, array &$values, &$classes)
Check every element of the list if it is an instance of one of the given classes.
checkBoolArg($which, $value)
Throw an InvalidArgumentException if $value is not a bool.