ILIAS  release_8 Revision v8.24
ToolIdentificationProvider.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
21
22use LogicException;
29{
33 public function contextAwareIdentifier(string $identifier_string, bool $ignore_context = false): IdentificationInterface
34 {
35 if ($ignore_context) {
36 return parent::identifier($identifier_string);
37 }
38 global $DIC;
39
40 $get = $DIC->http()->request()->getQueryParams();
41 if (isset($get['ref_id'])) {
42 $identifier_string .= '_' . $get['ref_id'];
43 }
44
45 return parent::identifier($identifier_string);
46 }
47
51 public function identifier(string $identifier_string): IdentificationInterface
52 {
53 throw new LogicException('Tools must use contextAwareIdentifier');
54 }
55}
contextAwareIdentifier(string $identifier_string, bool $ignore_context=false)
@inheritDoc
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...