19 declare(strict_types=1);
36 if ($component instanceof
State) {
37 return $this->
renderState($component, $default_renderer);
46 $tpl = $this->
getTemplate(
'tpl.promptstate.html',
true,
true);
47 $tpl->setVariable(
'COMMAND', $component->
getCommand());
50 $tpl->setCurrentBlock(
'param');
51 $tpl->setVariable(
'KEY', $key);
52 $tpl->setVariable(
'VALUE', $value);
53 $tpl->parseCurrentBlock();
57 if ($content_component ===
null) {
61 $tpl->setVariable(
'CONTENT', $default_renderer->render($content_component));
62 $tpl->setVariable(
'TITLE', $component->
getTitle());
66 $submit_button = $this->
getUIFactory()->button()->standard(
67 $content_component->getSubmitLabel() ?? $this->
txt(
"save"),
68 $content_component->getSubmitSignal()
70 $buttons[] = $submit_button;
74 ->standard($this->
txt(
'close_prompt'),
'')
76 fn(
$id) =>
"$('#$id').on('click', (e)=> { 77 let promptId = e.target.closest('dialog').parentNode.id; 78 il.UI.prompt.get(promptId).close(); 82 $tpl->setVariable(
'BUTTONS', $default_renderer->render($buttons));
renderState(State $component, RendererInterface $default_renderer)
Interface Observer Contains several chained tasks and infos about them.
txt(string $id)
Get a text from the language file.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getUIFactory()
Get a UI factory.
render(Component\Component $component, RendererInterface $default_renderer)
Base class for all component renderers.