19declare(strict_types=1);
37 protected $get_template
39 if (!is_callable($this->get_template)) {
40 throw new \InvalidArgumentException(
"\$get_template should be callable.");
73 if (count($tooltips) === 0) {
77 $get_template = $this->get_template;
78 $embed_html =
static function (
string $tooltip_id,
string $component_html) use ($tooltips, $get_template):
string {
79 $tpl = $get_template(
"components/ILIAS/UI/src/templates/default/tpl.tooltip.html",
true,
true);
84 foreach ($tooltips as $tooltip) {
93 $embed_js =
static function (
string $id) {
94 return "il.UI.Tooltip.createHoverTooltip(document.getElementById('$id'));";
97 return [$embed_html, $embed_js];
121 $get_template = $this->get_template;
122 $embed_html =
static function (
string $tooltip_id,
string $component_html) use ($tooltip, $get_template):
string {
123 $tpl = $get_template(
"components/ILIAS/UI/src/templates/default/tpl.tooltip.html",
true,
true);
132 $embed_js =
static function (
string $component_id) {
133 return "il.UI.Tooltip.createClickTooltip(document.getElementById('$component_id'));";
136 return [$embed_html, $embed_js];
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This is just a class that marks a string as a help topic.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
This describes a facility that the UI framework can use to retrieve some help text.
readonly ilGlobalTemplateInterface $tpl