ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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:66

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

+ 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.

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 }

◆ getPermanentLink()

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

Definition at line 75 of file PermanentLinkManager.php.

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 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ setPermanentLink()

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

Definition at line 90 of file PermanentLinkManager.php.

93 : void {
94 $uri = $this->getPermanentLink($posting, $edit);
96 }
static setPermaLink(string $perma_link)

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 files: