7use \ILIAS\UI\Implementation\Render\ResourceRegistry;
9use \ILIAS\UI\Renderer as DefaultRenderer;
10use \ILIAS\UI\Component\Component;
38 $this->ui_factory = $ui_factory;
39 $this->tpl_factory = $tpl_factory;
41 $this->js_binding = $js_binding;
47 $text = $component->text;
48 $component = $component->withAdditionalOnLoadCode(
function ($id) use ($text) {
49 return "id:$text.$id content:$text";
53 return $component->text;
63 $binder = $component->getOnLoadCode();
64 $this->js_binding->addOnLoadCode($binder(
"id"));
An exception for terminatinating execution or to throw for unit testing.
bindOnloadCode(\ILIAS\UI\Component\JavaScriptBindable $component)
registerResources(ResourceRegistry $registry)
Announce resources this renderer requires.
render(Component $component, DefaultRenderer $default_renderer)
__construct($ui_factory, $tpl_factory, $lng, $js_binding)
A component is the most general form of an entity in the UI.
Interface to be extended by components that have the possibility to bind to Javascript.
An entity that renders components to a string output.
Registry for resources required by rendered output like Javascript or CSS.
register($name)
Add a dependency.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
trait ComponentHelper
Provides common functionality for component implementations.
Class ChatMainBarProvider \MainMenu\Provider.