ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilLinkifyUtil.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
27  private static string $ver = "1_1";
28  private static string $min = ".min";
29 
30  public static function initLinkify(?ilGlobalTemplateInterface $a_tpl = null): void
31  {
32  global $DIC;
33 
34  $tpl = $DIC["tpl"];
35 
36  if ($a_tpl === null) {
37  $a_tpl = $tpl;
38  }
39 
40  foreach (self::getLocalJsPaths() as $p) {
41  $a_tpl->addJavaScript($p);
42  }
43  }
44 
49  public static function getLocalJsPaths(): array
50  {
51  return [
52  "./node_modules/linkifyjs/dist/linkify.min.js",
53  "./node_modules/linkify-jquery/dist/linkify-jquery.min.js",
54  "./Services/Link/js/ilExtLink.js"
55  ];
56  }
57 }
static string $min
static initLinkify(?ilGlobalTemplateInterface $a_tpl=null)
static getLocalJsPaths()
Get paths of necessary js files.
global $DIC
Definition: feed.php:28
Linkify utility class.
static string $ver