ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
class.ilBlogNewsRendererGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected \ILIAS\Blog\InternalGUIService $blog_gui;
24
25 public function __construct()
26 {
27 global $DIC;
29 $service = $DIC->blog()->internal();
30 $this->blog_gui = $service->gui();
31 }
32
33 public function getObjectLink(): string
34 {
35 $pl = $this->blog_gui->permanentLink($this->getNewsRefId());
36
37 $n = $this->getNewsItem();
38 $posting_id = 0;
39 if ($n->getContextSubObjType() === "blp"
40 && $n->getContextSubObjId() > 0) {
41 $posting_id = $n->getContextSubObjId();
42 }
43 return $pl->getPermanentLink($posting_id);
44 }
45}
getObjectLink()
Get link href for object link.
ILIAS Blog InternalGUIService $blog_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$service
Definition: ltiresult.php:44
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26