ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPortfolioDeclarationOfAuthorship.php
Go to the documentation of this file.
1<?php
2
25{
27 protected ilLanguage $lng;
28
29 public function __construct()
30 {
31 global $DIC;
32
33 $this->lng = $DIC->language();
34 $this->prtf_settings = new ilSetting("prtf");
35 }
36
40 public function getForLanguage(
41 string $l
42 ): string {
43 return (string) $this->prtf_settings->get("decl_author_" . $l);
44 }
45
49 public function setForLanguage(
50 string $l,
51 string $value
52 ): void {
53 $this->prtf_settings->set("decl_author_" . $l, $value);
54 }
55
59 public function getForUser(
60 ilObjUser $user
61 ): string {
62 $lng = $this->lng;
63
64 $decl = $this->getForLanguage($user->getLanguage());
65 if ($decl === "") {
66 $decl = $this->getForLanguage($lng->getDefaultLanguage());
67 }
68 return $decl;
69 }
70}
language handling
User class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setForLanguage(string $l, string $value)
Set for language.
ILIAS Setting Class.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
get(string $class_name)
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26