ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilTextHighlighterGUI.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
7
class
ilTextHighlighterGUI
8
{
12
public
static
function
highlight
($a_dom_node_id, $a_text, $a_tpl = null)
13
{
14
global
$DIC
;
15
16
$tpl
= $DIC[
"tpl"
];
17
18
if
(!trim($a_text)) {
19
return
;
20
}
21
22
if
($a_tpl == null) {
23
$a_tpl =
$tpl
;
24
}
25
$a_tpl->addJavascript(
"./Services/UIComponent/TextHighlighter/js/ilTextHighlighter.js"
);
26
$a_tpl->addOnLoadCode(
"il.TextHighlighter.highlight('"
. $a_dom_node_id .
"','"
. $a_text .
"');"
);
27
}
28
}
$DIC
global $DIC
Definition:
saml.php:7
$tpl
$tpl
Definition:
ilias.php:10
ilTextHighlighterGUI
Text highlighter.
Definition:
class.ilTextHighlighterGUI.php:7
ilTextHighlighterGUI\highlight
static highlight($a_dom_node_id, $a_text, $a_tpl=null)
Searches for all occurences of a text (case-insensitive) and highlights it.
Definition:
class.ilTextHighlighterGUI.php:12
Services
UIComponent
TextHighlighter
classes
class.ilTextHighlighterGUI.php
Generated on Sat Jan 18 2025 19:01:39 for ILIAS by
1.8.13 (using
Doxyfile
)