3declare(strict_types=1);
24use ILIAS\UI\Implementation\Component\ComponentHelper;
73 public function render(
Component $component, DefaultRenderer $default_renderer): string
76 $text = $component->text;
77 $component = $component->withAdditionalOnLoadCode(
function (
$id) use ($text) {
78 return "id:$text.$id content:$text";
82 return $component->text;
92 $binder = $component->getOnLoadCode();
93 $this->js_binding->addOnLoadCode($binder(
"id"));
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(string $text)
bindOnloadCode(\ILIAS\UI\Component\JavaScriptBindable $component)
registerResources(ResourceRegistry $registry)
Announce resources this renderer requires.
JavaScriptBinding $js_binding
__construct(Factory $ui_factory, TemplateFactory $tpl_factory, \ilLanguage $lng, JavaScriptBinding $js_binding)
render(Component $component, DefaultRenderer $default_renderer)
TemplateFactory $tpl_factory
__construct(string $text)
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.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
Provides methods to interface with javascript.
Registry for resources required by rendered output like Javascript or CSS.
register(string $name)
Add a dependency.
Interface for a factory that provides templates.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
Class ChatMainBarProvider \MainMenu\Provider.