ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\PermanentLink\PermanentLinkManager Class Reference

search for illink:: target=blog_4 : blog target=blog_4_4 : blog posting target=blog_4_4_edit : edit blog posting (tasks) target=blog_4_wsp : workspace blog target=blog_4_4_wsp : posting in workspace blog target=blog_4_4_edit_wsp : edit posting in workspace blog (tasks) More...

+ Collaboration diagram for ILIAS\PermanentLink\PermanentLinkManager:

Public Member Functions

 __construct (protected StaticUrl $static_url, InternalGUIService $gui, protected $ref_id=0, protected $wsp_id=0)
 
 getAppend (int $posting=0, bool $edit=false)
 
 getPermanentLink (int $posting=0, bool $edit=false)
 
 setPermanentLink (int $posting=0, bool $edit=false)
 

Protected Attributes

InternalGUIService $gui
 
InternalDomainService $domain
 

Detailed Description

search for illink:: target=blog_4 : blog target=blog_4_4 : blog posting target=blog_4_4_edit : edit blog posting (tasks) target=blog_4_wsp : workspace blog target=blog_4_4_wsp : posting in workspace blog target=blog_4_4_edit_wsp : edit posting in workspace blog (tasks)

Definition at line 38 of file PermanentLinkManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Exercise\PermanentLink\PermanentLinkManager::__construct ( protected StaticUrl  $static_url,
InternalGUIService  $gui,
protected  $ref_id = 0,
protected  $wsp_id = 0 
)

Definition at line 43 of file PermanentLinkManager.php.

References ILIAS\PermanentLink\PermanentLinkManager\$gui, $ref_id, and ILIAS\Blog\InternalGUIService\standardRequest().

48  {
49  $this->gui = $gui;
50  if ($ref_id === 0 && !$wsp_id) {
51  $this->ref_id = $this->gui->standardRequest()->getRefId();
52  }
53  if ($wsp_id === 0 && !$ref_id) {
54  $this->wsp_id = $this->gui->standardRequest()->getWspId();
55  }
56  }
$ref_id
Definition: ltiauth.php:65
+ Here is the call graph for this function:

Member Function Documentation

◆ getAppend()

ILIAS\PermanentLink\PermanentLinkManager::getAppend ( int  $posting = 0,
bool  $edit = false 
)

Definition at line 58 of file PermanentLinkManager.php.

Referenced by ILIAS\PermanentLink\PermanentLinkManager\getPermanentLink().

61  : array {
62  $append = [];
63  if ($posting > 0) {
64  $append[] = $posting;
65  }
66  if ($edit) {
67  $append[] = "edit";
68  }
69  if ($this->ref_id === 0 && $this->wsp_id > 0) {
70  $append[] = "wsp";
71  }
72  return $append;
73  }
+ Here is the caller graph for this function:

◆ getPermanentLink()

ILIAS\PermanentLink\PermanentLinkManager::getPermanentLink ( int  $posting = 0,
bool  $edit = false 
)

Definition at line 75 of file PermanentLinkManager.php.

References $id, ILIAS\PermanentLink\PermanentLinkManager\getAppend(), and null.

Referenced by ILIAS\PermanentLink\PermanentLinkManager\setPermanentLink().

78  : string {
79  $id = $this->ref_id > 0
80  ? $this->ref_id
81  : $this->wsp_id;
82  $uri = $this->static_url->builder()->build(
83  'blog', // namespace
84  $id > 0 ? new ReferenceId($id) : null,
85  $this->getAppend($posting, $edit)
86  );
87  return (string) $uri;
88  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPermanentLink()

ILIAS\PermanentLink\PermanentLinkManager::setPermanentLink ( int  $posting = 0,
bool  $edit = false 
)

Definition at line 90 of file PermanentLinkManager.php.

References ILIAS\PermanentLink\PermanentLinkManager\getPermanentLink().

93  : void {
94  $uri = $this->getPermanentLink($posting, $edit);
95  PageContentProvider::setPermaLink($uri);
96  }
+ Here is the call graph for this function:

Field Documentation

◆ $domain

InternalDomainService ILIAS\PermanentLink\PermanentLinkManager::$domain
protected

Definition at line 41 of file PermanentLinkManager.php.

◆ $gui

InternalGUIService ILIAS\PermanentLink\PermanentLinkManager::$gui
protected

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