ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLearningModuleNewsRendererGUI.php
Go to the documentation of this file.
1<?php
2
20use ILIAS\StaticURL\Services as StaticUrl;
21
28{
29 public function getObjectLink(): string
30 {
31 global $DIC;
33 $static_url = $DIC['static_url'];
34
35 $n = $this->getNewsItem();
36 if ($n->getContextSubObjType() == "pg"
37 && $n->getContextSubObjId() > 0) {
38 $uri = $static_url->builder()->build(
39 'pg', // namespace
40 null, // ref_id
41 [
42 $n->getContextSubObjId(),
43 $this->getNewsRefId()
44 ]
45 );
46 return (string) $uri;
47 //$add = "&target=pg_".$n->getContextSubObjId()."_".$this->getNewsRefId();
48 return ilLink::_getLink($n->getContextSubObjId() . "_" . $this->getNewsRefId(), "pg");
49 }
50 return ilLink::_getLink($this->getNewsRefId());
51 }
52}
Class Services.
Definition: Services.php:38
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getObjectLink()
Get link href for object link.
$static_url
Definition: goto.php:29
global $DIC
Definition: shib_login.php:26