19 declare(strict_types=1);
40 $factory = $DIC->ui()->factory();
43 $progress_bar = $factory->progress()->bar(
'clicking the button 10 times');
45 $make_progress = $factory->button()->standard(
'make some progress',
'#');
46 $make_progress = $make_progress->withAdditionalOnLoadCode(
47 static fn(
string $id) =>
" 49 document.getElementById('$id')?.addEventListener('click', (event) => { 50 if (90 === progress) { 51 event.target.disabled = true; 52 il.UI.Progress.Bar.success('{$progress_bar->getUpdateSignal()}', 'all done!'); 57 il.UI.Progress.Bar.determinate('{$progress_bar->getUpdateSignal()}', progress); 62 return $renderer->render([$progress_bar, $make_progress]);
client()
description: > This example shows how a Progress Bar can be rendered and used on the client...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins