ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilWikiNewsRendererGUI Class Reference

Wiki news renderer. More...

+ Inheritance diagram for ilWikiNewsRendererGUI:
+ Collaboration diagram for ilWikiNewsRendererGUI:

Public Member Functions

 getObjectLink ()
 Get object link. More...
 
- Public Member Functions inherited from ilNewsDefaultRendererGUI
 __construct ()
 Constructor. More...
 
 setNewsItem (ilNewsItem $a_news_item, $a_news_ref_id)
 Set news item.
Parameters
ilNewsItem$a_news_item
int$a_news_ref_id
More...
 
 getNewsItem ()
 Get news item. More...
 
 getNewsRefId ()
 Get news ref id. More...
 
 setLanguage ($a_lang_key)
 Language key.
Parameters
$iilNewsItem news item
More...
 
 getTimelineContent ()
 Render content for timeline.
Returns
string html
More...
 
 getDetailContent ()
 Render content for detail view.
Returns
string html
More...
 
 makeClickable ($a_str)
 Make clickable. More...
 
 addTimelineActions (ilAdvancedSelectionListGUI $list)
 
 getObjectLink ()
 Get object link. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilNewsDefaultRendererGUI
 $lng_key
 
 $ctrl
 
 $lng
 
 $news_item
 
 $news_ref_id
 

Detailed Description

Wiki news renderer.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 13 of file class.ilWikiNewsRendererGUI.php.

Member Function Documentation

◆ getObjectLink()

ilWikiNewsRendererGUI::getObjectLink ( )

Get object link.

Returns
string link href url

Implements ilNewsRendererGUI.

Definition at line 20 of file class.ilWikiNewsRendererGUI.php.

References $n, ilLink\_getLink(), ilNewsDefaultRendererGUI\getNewsItem(), ilNewsDefaultRendererGUI\getNewsRefId(), ilWikiPage\lookupTitle(), and ilWikiUtil\makeUrlTitle().

21  {
22  include_once("./Services/Link/classes/class.ilLink.php");
23  $n = $this->getNewsItem();
24  if ($n->getContextSubObjType() == "wpg"
25  && $n->getContextSubObjId() > 0) {
26  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
27  $wptitle = ilWikiPage::lookupTitle($n->getContextSubObjId());
28  if ($wptitle != "") {
29  $add = "_" . ilWikiUtil::makeUrlTitle($wptitle);
30  }
31  }
32 
33  return ilLink::_getLink($this->getNewsRefId(), "", array(), $add);
34  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
$n
Definition: RandomTest.php:85
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: