ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
ILIAS\UI\Implementation\Component Namespace Reference

Namespaces

 Button
 
 Card
 
 Counter
 
 Deck
 
 Glyph
 
 Image
 
 Legacy
 
 Listing
 
 Panel
 

Functions

 withOnLoadCode (\Closure $binder)
 
 getOnLoadCode ()
 
 checkBinder (\Closure $binder)
 

Variables

trait JavaScriptBindable
 Trait for components implementing JavaScriptBindable providing standard implementation. More...
 

Function Documentation

◆ checkBinder()

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

Definition at line 39 of file JavaScriptBindable.php.

References array.

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

39  {
40  $refl = new \ReflectionFunction($binder);
41  $args = array_map(function($arg) { return $arg->name; }, $refl->getParameters());
42  if (array("id") !== $args) {
43  throw new \InvalidArgumentException('Expected closure "$binder" to have exactly one argument "$id".');
44  }
45  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getOnLoadCode()

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

Definition at line 30 of file JavaScriptBindable.php.

Referenced by ilSCORM2004PageGUI\postOutputProcessing().

30  {
31  return $this->on_load_code_binder;
32  }
+ Here is the caller graph for this function:

◆ withOnLoadCode()

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

Definition at line 20 of file JavaScriptBindable.php.

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

Referenced by ilOnScreenChatMenuGUI\getMainMenuHTML().

20  {
21  $this->checkBinder($binder);
22  $clone = clone $this;
23  $clone->on_load_code_binder = $binder;
24  return $clone;
25  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ JavaScriptBindable

trait ILIAS::UI::Implementation::Component\JavaScriptBindable
Initial value:
{
private $on_load_code_binder = null

Trait for components implementing JavaScriptBindable providing standard implementation.

Definition at line 11 of file JavaScriptBindable.php.