ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPortfolioDeclarationOfAuthorship Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilPortfolioDeclarationOfAuthorship:

Public Member Functions

 __construct ()
 
 getForLanguage (string $l)
 Get for language. More...
 
 setForLanguage (string $l, string $value)
 Set for language. More...
 
 getForUser (ilObjUser $user)
 Get for user. More...
 

Protected Attributes

ilSetting $prtf_settings
 
ilLanguage $lng
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Declaration of authorship (data gateway)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilPortfolioDeclarationOfAuthorship.php.

Constructor & Destructor Documentation

◆ __construct()

ilPortfolioDeclarationOfAuthorship::__construct ( )

Definition at line 29 of file class.ilPortfolioDeclarationOfAuthorship.php.

References $DIC, and ILIAS\Repository\lng().

30  {
31  global $DIC;
32 
33  $this->lng = $DIC->language();
34  $this->prtf_settings = new ilSetting("prtf");
35  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getForLanguage()

ilPortfolioDeclarationOfAuthorship::getForLanguage ( string  $l)

Get for language.

Definition at line 40 of file class.ilPortfolioDeclarationOfAuthorship.php.

Referenced by getForUser().

42  : string {
43  return (string) $this->prtf_settings->get("decl_author_" . $l);
44  }
+ Here is the caller graph for this function:

◆ getForUser()

ilPortfolioDeclarationOfAuthorship::getForUser ( ilObjUser  $user)

Get for user.

Definition at line 59 of file class.ilPortfolioDeclarationOfAuthorship.php.

References $lng, ilLanguage\getDefaultLanguage(), getForLanguage(), and ilObjUser\getLanguage().

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  }
getDefaultLanguage()
Return default language.
+ Here is the call graph for this function:

◆ setForLanguage()

ilPortfolioDeclarationOfAuthorship::setForLanguage ( string  $l,
string  $value 
)

Set for language.

Definition at line 49 of file class.ilPortfolioDeclarationOfAuthorship.php.

52  : void {
53  $this->prtf_settings->set("decl_author_" . $l, $value);
54  }

Field Documentation

◆ $lng

ilLanguage ilPortfolioDeclarationOfAuthorship::$lng
protected

Definition at line 27 of file class.ilPortfolioDeclarationOfAuthorship.php.

Referenced by getForUser().

◆ $prtf_settings

ilSetting ilPortfolioDeclarationOfAuthorship::$prtf_settings
protected

Definition at line 26 of file class.ilPortfolioDeclarationOfAuthorship.php.


The documentation for this class was generated from the following file: