ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ILIAS\UI\Implementation\Component Namespace Reference

Namespaces

 Breadcrumbs
 
 Button
 
 Card
 
 Chart
 
 Counter
 
 Deck
 
 Divider
 
 Dropdown
 
 Dropzone
 
 Glyph
 
 Icon
 
 Image
 
 Input
 
 Item
 
 Legacy
 
 
 Listing
 
 MessageBox
 
 Modal
 
 Panel
 
 Popover
 
 Table
 
 ViewControl
 

Data Structures

class  ReplaceContentSignal
 Class ReplaceContentSignal. More...
 
class  ReplaceSignal
 Replace Signal. More...
 
class  Signal
 
class  SignalGenerator
 
interface  SignalGeneratorInterface
 
class  TriggeredSignal
 

Functions

 withLoadingAnimationOnClick (bool $loading_animation_on_click=true)
 
 hasLoadingAnimationOnClick ()
 
 getCanonicalName ()
 Default implementation uses the namespace of the component up to and excluding "Component", reverses the order and adds spaces. More...
 
 getCanonicalNameByFullyQualifiedName ()
 Does the calculation required for getCanonicalName. More...
 
 checkArg ($which, $check, $message)
 /** Throw an InvalidArgumentException containing the message if $check is false. More...
 
 checkIntArg ($which, $value)
 Throw an InvalidArgumentException if $value is no int. More...
 
 checkStringArg ($which, $value)
 Throw an InvalidArgumentException if $value is no string. More...
 
 checkStringOrSignalArg ($which, $value)
 Throw an InvalidArgumentException if $value is no string or Signal. More...
 
 checkFloatArg ($which, $value)
 Throw an InvalidArgumentException if $value is not a float. More...
 
 checkBoolArg ($which, $value)
 Throw an InvalidArgumentException if $value is not a bool. More...
 
 checkArgInstanceOf ($which, $value, $class)
 Throw an InvalidArgumentException if $value is not an instance of $class. More...
 
 checkArgIsElement ($which, $value, $array, $name)
 Throw an InvalidArgumentException if $value is not an element of array. More...
 
 checkArgList ($which, array &$values, \Closure $check, \Closure $message)
 Check every key and value of the list with a supplied closure. More...
 
 checkArgListElements ($which, array &$values, &$classes)
 Check every element of the list if it is an instance of one of the given classes. More...
 
 toArray ($value)
 Wrap the given value in an array if it is no array. More...
 
 wrongTypeMessage ($expected, $value)
 
 withOnLoadCode (\Closure $binder)
 
 withAdditionalOnLoadCode (\Closure $binder)
 
 getOnLoadCode ()
 
 checkBinder (\Closure $binder)
 
 appendTriggeredSignal (Component\Signal $signal, $event)
 Append a triggered signal to other signals of the same event. More...
 
 withTriggeredSignal (Component\Signal $signal, $event)
 Add a triggered signal, replacing any other signals registered on the same event. More...
 
 setTriggeredSignal (Component\Signal $signal, $event)
 Add a triggered signal, replacing any othe signals registered on the same event. More...
 
 getTriggeredSignals ()
 
 getTriggeredSignalsFor ($event)
 Get signals that are triggered for a certain event. More...
 
 withResetTriggeredSignals ()
 
 flattenArray (array $array)
 Flatten a multidimensional array to a single dimension. More...
 

Variables

trait LoadingAnimationOnClick
 Implements LoadingAnimationOnClick interface. More...
 
trait ComponentHelper
 Provides common functionality for component implementations. More...
 
trait JavaScriptBindable
 Trait for components implementing JavaScriptBindable providing standard implementation. More...
 
trait Triggerer
 

Function Documentation

◆ appendTriggeredSignal()

ILIAS\UI\Implementation\Component\appendTriggeredSignal ( Component\Signal  $signal,
  $event 
)
protected

◆ checkArg()

ILIAS\UI\Implementation\Component\checkArg (   $which,
  $check,
  $message 
)
protected

/** Throw an InvalidArgumentException containing the message if $check is false.

Parameters
string$which
bool$check
string$message
Exceptions

Definition at line 61 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\Listing\Workflow\Step\__construct(), ComponentMock\_checkArg(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withAction(), ILIAS\UI\Implementation\Component\Input\Field\withGroupValues(), and ILIAS\UI\Implementation\Component\Input\Field\Input\withValue().

62  {
63  assert(is_string($which));
64  assert(is_bool($check));
65  assert(is_string($message));
66  if (!$check) {
67  throw new \InvalidArgumentException("Argument '$which': $message");
68  }
69  }
catch(Exception $e) $message
+ Here is the caller graph for this function:

◆ checkArgInstanceOf()

ILIAS\UI\Implementation\Component\checkArgInstanceOf (   $which,
  $value,
  $class 
)
protected

Throw an InvalidArgumentException if $value is not an instance of $class.

Parameters
string$which
mixed$value
string$class
Exceptions

Definition at line 149 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\ViewControl\Section\__construct(), ILIAS\UI\Implementation\Component\Modal\LightboxImagePage\__construct(), ComponentMock\_checkArgInstanceOf(), ILIAS\UI\Implementation\Component\Breadcrumbs\Breadcrumbs\withAppendedItem(), ILIAS\UI\Implementation\Component\Button\Tag\withBackgroundColor(), ILIAS\UI\Implementation\Component\Dropzone\File\File\withFileSizeLimit(), and ILIAS\UI\Implementation\Component\Button\Tag\withForegroundColor().

150  {
151  $this->checkArg($which, $value instanceof $class, $this->wrongTypeMessage($class, $value));
152  }
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
+ Here is the caller graph for this function:

◆ checkArgIsElement()

ILIAS\UI\Implementation\Component\checkArgIsElement (   $which,
  $value,
  $array,
  $name 
)
protected

Throw an InvalidArgumentException if $value is not an element of array.

Parameters
string$which
mixed$value
array$array
string$nameused in the exception
Exceptions

Definition at line 164 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\Icon\Custom\__construct(), ILIAS\UI\Implementation\Component\Deck\Deck\__construct(), ILIAS\UI\Implementation\Component\Counter\Counter\__construct(), ILIAS\UI\Implementation\Component\MessageBox\MessageBox\__construct(), ILIAS\UI\Implementation\Component\Image\Image\__construct(), ILIAS\UI\Implementation\Component\Glyph\Glyph\__construct(), ILIAS\UI\Implementation\Component\Icon\Standard\__construct(), ComponentMock\_checkArgIsElement(), ILIAS\UI\Implementation\Component\Listing\Workflow\Step\withAvailability(), ILIAS\UI\Implementation\Component\Deck\Deck\withCardsSize(), ILIAS\UI\Implementation\Component\Button\Tag\withRelevance(), ILIAS\UI\Implementation\Component\Icon\Icon\withSize(), and ILIAS\UI\Implementation\Component\Listing\Workflow\Step\withStatus().

165  {
166  if (!is_object($value)) {
167  $message = "expected $name, got '$value'";
168  } else {
169  $message = "expected $name, got object.";
170  }
171  $message =
172  $this->checkArg($which, in_array($value, $array), $message);
173  }
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
catch(Exception $e) $message
+ Here is the caller graph for this function:

◆ checkArgList()

ILIAS\UI\Implementation\Component\checkArgList (   $which,
array &  $values,
\Closure  $check,
\Closure  $message 
)
protected

Check every key and value of the list with a supplied closure.

Parameters
string$which
mixed[]&$values
\Closure$checktakes key and value, should return false if those don't fit
\Closure$messagecreate an error message from key and value
Exceptions

Definition at line 185 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\Listing\Descriptive\__construct(), ComponentMock\_checkArgList(), and ILIAS\UI\Implementation\Component\Listing\Descriptive\withItems().

186  {
187  $failed_k = null;
188  $failed_v = null;
189  foreach ($values as $key => $value) {
190  $ok = $check($key, $value);
191  if (!$ok) {
192  $failed_k = $key;
193  $failed_v = $value;
194  break;
195  }
196  }
197 
198  if ($failed_k !== null) {
199  $m = $message($failed_k, $failed_v);
200  } else {
201  $m = "";
202  }
203 
204  $this->checkArg($which, $failed_k === null, $m);
205  }
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
catch(Exception $e) $message
$values
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

◆ checkArgListElements()

ILIAS\UI\Implementation\Component\checkArgListElements (   $which,
array &  $values,
$classes 
)
protected

Check every element of the list if it is an instance of one of the given classes.

Throw an InvalidArgumentException if that is not the case.

Parameters
string$which
mixed[]&$values
string|string[]$classes name(s) of classes
Exceptions

Definition at line 217 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\Breadcrumbs\Breadcrumbs\__construct(), ILIAS\UI\Implementation\Component\Panel\Report\__construct(), ILIAS\UI\Implementation\Component\Modal\Lightbox\__construct(), ILIAS\UI\Implementation\Component\Button\Bulky\__construct(), ILIAS\UI\Implementation\Component\Popover\Standard\__construct(), ILIAS\UI\Implementation\Component\Popover\Listing\__construct(), ILIAS\UI\Implementation\Component\Deck\Deck\__construct(), ILIAS\UI\Implementation\Component\Listing\Listing\__construct(), ILIAS\UI\Implementation\Component\Dropzone\File\Wrapper\__construct(), ILIAS\UI\Implementation\Component\Panel\Panel\__construct(), ILIAS\UI\Implementation\Component\Listing\Workflow\Workflow\__construct(), ILIAS\UI\Implementation\Component\Modal\RoundTrip\__construct(), ILIAS\UI\Implementation\Component\Input\Container\Form\Form\__construct(), ComponentMock\_checkArgListElements(), ILIAS\UI\Implementation\Component\Modal\RoundTrip\withActionButtons(), ILIAS\UI\Implementation\Component\Modal\Interruptive\withAffectedItems(), ILIAS\UI\Implementation\Component\MessageBox\MessageBox\withButtons(), ILIAS\UI\Implementation\Component\Deck\Deck\withCards(), ILIAS\UI\Implementation\Component\Dropzone\File\Wrapper\withContent(), ILIAS\UI\Implementation\Component\Listing\Listing\withItems(), ILIAS\UI\Implementation\Component\MessageBox\MessageBox\withLinks(), and ILIAS\UI\Implementation\Component\Card\Card\withSections().

218  {
219  $classes = $this->toArray($classes);
220  $this->checkArgList($which, $values, function ($_, $value) use (&$classes) {
221  foreach ($classes as $cls) {
222  if ($cls === "string" && is_string($value)) {
223  return true;
224  }
225  if ($cls === "int" && is_int($value)) {
226  return true;
227  } elseif ($value instanceof $cls) {
228  return true;
229  }
230  }
231  return false;
232  }, function ($_, $failed) use (&$classes) {
233  return $this->wrongTypeMessage(implode(", ", $classes), $failed);
234  });
235  }
checkArgList($which, array &$values, \Closure $check, \Closure $message)
Check every key and value of the list with a supplied closure.
$values
$failed
Definition: Utf8Test.php:85
toArray($value)
Wrap the given value in an array if it is no array.
+ Here is the caller graph for this function:

◆ checkBinder()

ILIAS\UI\Implementation\Component\checkBinder ( \Closure  $binder)
private
Parameters
\Closure$binder
Exceptions

Definition at line 58 of file JavaScriptBindable.php.

Referenced by ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

59  {
60  $refl = new \ReflectionFunction($binder);
61  $args = array_map(function ($arg) {
62  return $arg->name;
63  }, $refl->getParameters());
64  if (array("id") !== $args) {
65  throw new \InvalidArgumentException('Expected closure "$binder" to have exactly one argument "$id".');
66  }
67  }
+ Here is the caller graph for this function:

◆ checkBoolArg()

ILIAS\UI\Implementation\Component\checkBoolArg (   $which,
  $value 
)
protected

◆ checkFloatArg()

ILIAS\UI\Implementation\Component\checkFloatArg (   $which,
  $value 
)
protected

Throw an InvalidArgumentException if $value is not a float.

Parameters
string$which
mixed$value
Exceptions

Definition at line 122 of file ComponentHelper.php.

Referenced by ComponentMock\_checkFloatArg().

123  {
124  $this->checkArg($which, is_float($value), $this->wrongTypeMessage("float", $value));
125  }
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
+ Here is the caller graph for this function:

◆ checkIntArg()

ILIAS\UI\Implementation\Component\checkIntArg (   $which,
  $value 
)
protected

◆ checkStringArg()

ILIAS\UI\Implementation\Component\checkStringArg (   $which,
  $value 
)
protected

Throw an InvalidArgumentException if $value is no string.

Parameters
string$which
mixed$value
Exceptions

Definition at line 92 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\Icon\Custom\__construct(), ILIAS\UI\Implementation\Component\Input\Container\Form\Standard\__construct(), ILIAS\UI\Implementation\Component\Link\Standard\__construct(), ILIAS\UI\Implementation\Component\Button\Bulky\__construct(), ILIAS\UI\Implementation\Component\Link\Link\__construct(), ILIAS\UI\Implementation\Component\Legacy\Legacy\__construct(), ILIAS\UI\Implementation\Component\Modal\LightboxTextPage\__construct(), ILIAS\UI\Implementation\Component\ViewControl\Mode\__construct(), ILIAS\UI\Implementation\Component\Panel\Listing\Listing\__construct(), ILIAS\UI\Implementation\Component\Item\Group\__construct(), ILIAS\UI\Implementation\Component\Listing\Workflow\Workflow\__construct(), ILIAS\UI\Implementation\Component\Panel\Panel\__construct(), ILIAS\UI\Implementation\Component\Modal\LightboxImagePage\__construct(), ILIAS\UI\Implementation\Component\Modal\InterruptiveItem\__construct(), ILIAS\UI\Implementation\Component\Modal\RoundTrip\__construct(), ILIAS\UI\Implementation\Component\Table\Presentation\__construct(), ILIAS\UI\Implementation\Component\MessageBox\MessageBox\__construct(), ILIAS\UI\Implementation\Component\Listing\Workflow\Step\__construct(), ILIAS\UI\Implementation\Component\Item\Item\__construct(), ILIAS\UI\Implementation\Component\Button\Button\__construct(), ILIAS\UI\Implementation\Component\Modal\Interruptive\__construct(), ILIAS\UI\Implementation\Component\Card\Card\__construct(), ILIAS\UI\Implementation\Component\Image\Image\__construct(), ILIAS\UI\Implementation\Component\Dropzone\File\File\__construct(), ILIAS\UI\Implementation\Component\Input\Field\Input\__construct(), ILIAS\UI\Implementation\Component\Glyph\Glyph\__construct(), ILIAS\UI\Implementation\Component\Icon\Standard\__construct(), ComponentMock\_checkStringArg(), ILIAS\UI\Implementation\Component\Input\Field\Input\setError(), ILIAS\UI\Implementation\Component\Icon\Icon\withAbbreviation(), ILIAS\UI\Implementation\Component\ViewControl\Mode\withActive(), ILIAS\UI\Implementation\Component\Image\Image\withAlt(), ILIAS\UI\Implementation\Component\Dropdown\Dropdown\withAriaLabel(), ILIAS\UI\Implementation\Component\Button\Button\withAriaLabel(), ILIAS\UI\Implementation\Component\Popover\Popover\withAsyncContentUrl(), ILIAS\UI\Implementation\Component\ReplaceSignal\withAsyncRenderUrl(), ILIAS\UI\Implementation\Component\ReplaceContentSignal\withAsyncRenderUrl(), ILIAS\UI\Implementation\Component\Modal\Modal\withAsyncRenderUrl(), ILIAS\UI\Implementation\Component\Input\Field\Input\withByline(), ILIAS\UI\Implementation\Component\Button\Tag\withClasses(), ILIAS\UI\Implementation\Component\Item\Item\withDescription(), ILIAS\UI\Implementation\Component\Modal\Interruptive\withFormAction(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withFurtherFieldsHeadline(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withHeadline(), ILIAS\UI\Implementation\Component\Card\Card\withImageAction(), ILIAS\UI\Implementation\Component\Divider\Horizontal\withLabel(), ILIAS\UI\Implementation\Component\Button\Button\withLabel(), ILIAS\UI\Implementation\Component\Dropdown\Dropdown\withLabel(), ILIAS\UI\Implementation\Component\ViewControl\Sortation\withLabel(), ILIAS\UI\Implementation\Component\Input\Field\Input\withLabel(), ILIAS\UI\Implementation\Component\Item\Item\withLeadText(), ILIAS\UI\Implementation\Component\Chart\ProgressMeter\Standard\withMainText(), ILIAS\UI\Implementation\Component\Dropzone\File\Standard\withMessage(), ILIAS\UI\Implementation\Component\Dropzone\File\File\withParameterName(), ILIAS\UI\Implementation\Component\Button\Tag\withRelevance(), ILIAS\UI\Implementation\Component\Chart\ProgressMeter\Standard\withRequiredText(), ILIAS\UI\Implementation\Component\Image\Image\withSource(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withSubheadline(), ILIAS\UI\Implementation\Component\ViewControl\Sortation\withTargetURL(), ILIAS\UI\Implementation\Component\ViewControl\Pagination\withTargetURL(), ILIAS\UI\Implementation\Component\Dropzone\File\Wrapper\withTitle(), ILIAS\UI\Implementation\Component\Card\Card\withTitle(), ILIAS\UI\Implementation\Component\Table\Presentation\withTitle(), ILIAS\UI\Implementation\Component\Popover\Popover\withTitle(), ILIAS\UI\Implementation\Component\Card\Card\withTitleAction(), and ILIAS\UI\Implementation\Component\Dropzone\File\File\withUploadUrl().

93  {
94  $this->checkArg($which, is_string($value), $this->wrongTypeMessage("string", $value));
95  }
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
+ Here is the caller graph for this function:

◆ checkStringOrSignalArg()

ILIAS\UI\Implementation\Component\checkStringOrSignalArg (   $which,
  $value 
)
protected

Throw an InvalidArgumentException if $value is no string or Signal.

Parameters
string$which
mixed$value
Exceptions

Definition at line 105 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\Button\Toggle\__construct(), ILIAS\UI\Implementation\Component\Button\Button\__construct(), and ILIAS\UI\Implementation\Component\Image\Image\withAction().

106  {
107  $this->checkArg(
108  $which,
109  is_string($value) || $value instanceof Signal,
110  $this->wrongTypeMessage("string or Signal", gettype($value))
111  );
112  }
checkArg($which, $check, $message)
/** Throw an InvalidArgumentException containing the message if $check is false.
+ Here is the caller graph for this function:

◆ flattenArray()

ILIAS\UI\Implementation\Component\flattenArray ( array  $array)
private

Flatten a multidimensional array to a single dimension.

Parameters
array$array
Returns
array

Definition at line 114 of file Triggerer.php.

Referenced by ILIAS\UI\Implementation\Component\getTriggeredSignals().

115  {
116  $flatten = array();
117  array_walk_recursive($array, function ($a) use (&$flatten) {
118  $flatten[] = $a;
119  });
120  return $flatten;
121  }
+ Here is the caller graph for this function:

◆ getCanonicalName()

ILIAS\UI\Implementation\Component\getCanonicalName ( )

Default implementation uses the namespace of the component up to and excluding "Component", reverses the order and adds spaces.

Also does caching.

Returns
string

Definition at line 25 of file ComponentHelper.php.

References ILIAS\UI\Implementation\Component\getCanonicalNameByFullyQualifiedName().

26  {
27  if ($this->canonical_name === null) {
28  $this->canonical_name = $this->getCanonicalNameByFullyQualifiedName();
29  }
30  return $this->canonical_name;
31  }
getCanonicalNameByFullyQualifiedName()
Does the calculation required for getCanonicalName.
+ Here is the call graph for this function:

◆ getCanonicalNameByFullyQualifiedName()

ILIAS\UI\Implementation\Component\getCanonicalNameByFullyQualifiedName ( )
protected

Does the calculation required for getCanonicalName.

Returns
string

Definition at line 38 of file ComponentHelper.php.

References $name.

Referenced by ILIAS\UI\Implementation\Component\getCanonicalName().

39  {
40  $cls = explode("\\", get_class($this));
41  $name = [];
42  $cur = array_pop($cls);
43  while ($cur !== "Component" && count($cls) > 0) {
44  $name[] = preg_replace("%([a-z])([A-Z])%", "$1 $2", $cur);
45  $cur = array_pop($cls);
46  }
47  return implode(" ", $name);
48  }
+ Here is the caller graph for this function:

◆ getOnLoadCode()

ILIAS\UI\Implementation\Component\getOnLoadCode ( )
See also
getOnLoadCode

Definition at line 48 of file JavaScriptBindable.php.

Referenced by ilSCORM2004PageGUI\postOutputProcessing(), and ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode().

49  {
50  return $this->on_load_code_binder;
51  }
+ Here is the caller graph for this function:

◆ getTriggeredSignals()

ILIAS\UI\Implementation\Component\getTriggeredSignals ( )
Returns
[]

Definition at line 74 of file Triggerer.php.

References ILIAS\UI\Implementation\Component\flattenArray().

75  {
76  return $this->flattenArray($this->triggered_signals);
77  }
flattenArray(array $array)
Flatten a multidimensional array to a single dimension.
Definition: Triggerer.php:114
+ Here is the call graph for this function:

◆ getTriggeredSignalsFor()

ILIAS\UI\Implementation\Component\getTriggeredSignalsFor (   $event)

Get signals that are triggered for a certain event.

Parameters
string
Returns
[]

Definition at line 85 of file Triggerer.php.

Referenced by ILIAS\UI\Implementation\Component\Button\Button\getAction(), ILIAS\UI\Implementation\Component\Image\Image\getAction(), ILIAS\UI\Implementation\Component\Button\Toggle\getActionOff(), and ILIAS\UI\Implementation\Component\Button\Toggle\getActionOn().

86  {
87  if (!isset($this->triggered_signals[$event])) {
88  return [];
89  }
90  return array_map(
91  function ($ts) {
92  return $ts->getSignal();
93  },
94  $this->triggered_signals[$event]
95  );
96  }
+ Here is the caller graph for this function:

◆ hasLoadingAnimationOnClick()

ILIAS\UI\Implementation\Component\hasLoadingAnimationOnClick ( )

Definition at line 32 of file LoadingAnimationOnClick.php.

32  : bool
33  {
34  return $this->loading_animation_on_click;
35  }

◆ setTriggeredSignal()

ILIAS\UI\Implementation\Component\setTriggeredSignal ( Component\Signal  $signal,
  $event 
)
protected

Add a triggered signal, replacing any othe signals registered on the same event.

ATTENTION: This mutates the original object and should only be used when there is no other possibility.

Parameters
Component\Signal$signal
string$event
Returns
void

Definition at line 65 of file Triggerer.php.

Referenced by ILIAS\UI\Implementation\Component\Button\Toggle\__construct(), ILIAS\UI\Implementation\Component\Button\Button\__construct(), and Triggerermock\_setTriggeredSignal().

66  {
67  $this->triggered_signals[$event] = array();
68  $this->triggered_signals[$event][] = new TriggeredSignal($signal, $event);
69  }
+ Here is the caller graph for this function:

◆ toArray()

◆ withAdditionalOnLoadCode()

ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode ( \Closure  $binder)
See also
withAdditionalOnLoadCode

Definition at line 32 of file JavaScriptBindable.php.

References $id, ILIAS\UI\Implementation\Component\checkBinder(), ILIAS\UI\Implementation\Component\getOnLoadCode(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

Referenced by ilNoteGUI\getCommentsWidget(), and JavaScriptBindableTest\test_withAdditionalOnLoadCode().

33  {
34  $current_binder = $this->getOnLoadCode();
35  if ($current_binder === null) {
36  return $this->withOnLoadCode($binder);
37  }
38 
39  $this->checkBinder($binder);
40  return $this->withOnLoadCode(function ($id) use ($current_binder, $binder) {
41  return $current_binder($id) . "\n" . $binder($id);
42  });
43  }
if(!array_key_exists('StateId', $_REQUEST)) $id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withLoadingAnimationOnClick()

ILIAS\UI\Implementation\Component\withLoadingAnimationOnClick ( bool  $loading_animation_on_click = true)

Definition at line 22 of file LoadingAnimationOnClick.php.

Referenced by ilLearningHistoryGUI\renderButton(), and ilContainerRenderer\renderHelperGeneric().

23  {
24  $clone = clone $this;
25  $clone->loading_animation_on_click = $loading_animation_on_click;
26  return $clone;
27  }
+ Here is the caller graph for this function:

◆ withOnLoadCode()

ILIAS\UI\Implementation\Component\withOnLoadCode ( \Closure  $binder)

◆ withResetTriggeredSignals()

ILIAS\UI\Implementation\Component\withResetTriggeredSignals ( )
Returns
$this

Definition at line 101 of file Triggerer.php.

102  {
103  $clone = clone $this;
104  $clone->triggered_signals = array();
105  return $clone;
106  }

◆ withTriggeredSignal()

◆ wrongTypeMessage()

ILIAS\UI\Implementation\Component\wrongTypeMessage (   $expected,
  $value 
)
protected

Definition at line 251 of file ComponentHelper.php.

Referenced by ILIAS\UI\Implementation\Component\Listing\Workflow\Step\__construct(), and ILIAS\UI\Implementation\Component\Table\PresentationRow\withAction().

252  {
253  $type = gettype($value);
254  if (!is_object($value) && !is_array($value)) {
255  return "expected $expected, got $type '$value'";
256  } else {
257  if (is_object($value)) {
258  $type = get_class($value);
259  }
260  return "expected $expected, got $type";
261  }
262  }
$type
+ Here is the caller graph for this function:

Variable Documentation

◆ ComponentHelper

trait ILIAS::UI::Implementation::Component\ComponentHelper
Initial value:
{
private $canonical_name = null

Provides common functionality for component implementations.

Definition at line 13 of file ComponentHelper.php.

◆ JavaScriptBindable

Initial value:
{
private $on_load_code_binder = null

Trait for components implementing JavaScriptBindable providing standard implementation.

Definition at line 12 of file JavaScriptBindable.php.

◆ LoadingAnimationOnClick

trait ILIAS::UI::Implementation::Component\LoadingAnimationOnClick
Initial value:
{
protected $loading_animation_on_click = false

Implements LoadingAnimationOnClick interface.

Author
killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 12 of file LoadingAnimationOnClick.php.

◆ Triggerer

Initial value:
{
private $triggered_signals = array()

Definition at line 17 of file Triggerer.php.