ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
WithdrawalAcknowledgementLogoutTarget.php
Go to the documentation of this file.
1 <?php
2 
20 declare(strict_types=1);
21 
22 namespace ILIAS\LegalDocuments;
23 
24 use ILIAS\Data\URI;
25 use ilCtrlInterface;
28 
30 {
31  public function __construct(
32  private LogoutTarget $origin,
33  private bool $user_withdrew_legal_docs,
34  private ilCtrlInterface $ctrl,
35  private string $http_path = ILIAS_HTTP_PATH
36  ) {
37  }
38 
39  public function asURI(): URI
40  {
41  if ($this->user_withdrew_legal_docs) {
42  return LogoutDestinations::LOGIN_SCREEN->asURI($this->ctrl, $this->http_path);
43  }
44 
45  return $this->origin->asURI();
46  }
47 }
The scope of this class is split ilias-conform URI&#39;s into components.
Definition: URI.php:34
__construct(private LogoutTarget $origin, private bool $user_withdrew_legal_docs, private ilCtrlInterface $ctrl, private string $http_path=ILIAS_HTTP_PATH)