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

Namespaces

namespace  Button
 
namespace  Card
 
namespace  Counter
 
namespace  Deck
 
namespace  Glyph
 
namespace  Image
 
namespace  Legacy
 
namespace  Listing
 
namespace  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

InvalidArgumentException if closure does not take one argument

Returns
null

Definition at line 39 of file JavaScriptBindable.php.

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 }

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

+ Here is the caller graph for this function:

◆ getOnLoadCode()

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

Definition at line 30 of file JavaScriptBindable.php.

30 {
31 return $this->on_load_code_binder;
32 }

Referenced by ilSCORM2004PageGUI\postOutputProcessing().

+ Here is the caller graph for this function:

◆ withOnLoadCode()

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

Definition at line 20 of file JavaScriptBindable.php.

20 {
21 $this->checkBinder($binder);
22 $clone = clone $this;
23 $clone->on_load_code_binder = $binder;
24 return $clone;
25 }

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

+ Here is the call 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.

Examples
/usr/local/src/ilias/release_5-2/src/UI/Component/JavaScriptBindable.php.

Definition at line 11 of file JavaScriptBindable.php.