ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
PermanentLinkManager.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\StaticURL\Services as StaticUrl;
27
29{
30 public function __construct(
31 protected StaticUrl $static_url,
32 protected InternalGUIService $gui,
33 protected $ref_id = 0
34 ) {
35 $this->ref_id = $this->gui->standardRequest()->getRefId();
36 }
37
38 public function getPermanentLink(
39 ): string {
40 $id = $this->ref_id;
41 $uri = $this->static_url->builder()->build(
42 'mep', // namespace
43 $id > 0 ? new ReferenceId($id) : null
44 );
45 return (string) $uri;
46 }
47
48 public function setPermanentLink(
49 ): void {
50 $uri = $this->getPermanentLink();
52 }
53}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Class Services.
Definition: Services.php:38
static setPermaLink(string $perma_link)
$static_url
Definition: goto.php:29
$ref_id
Definition: ltiauth.php:66