ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilStudyProgrammeTypeInfo Class Reference
+ Collaboration diagram for ilStudyProgrammeTypeInfo:

Public Member Functions

 __construct (?string $title=null, ?string $description=null, ?string $lng_code=null)
 
 getTitle ()
 
 withTitle (string $title)
 
 getDescription ()
 
 withDescription (string $description)
 
 getLanguageCode ()
 
 withLanguageCode (string $lng_code)
 
 toFormInput (Field\Factory $input, ilLanguage $lng, Refinery $refinery)
 

Protected Attributes

string $title
 
string $description
 
string $lng_code
 

Detailed Description

Definition at line 25 of file class.ilStudyProgrammeTypeInfo.php.

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeTypeInfo::__construct ( ?string  $title = null,
?string  $description = null,
?string  $lng_code = null 
)

Definition at line 31 of file class.ilStudyProgrammeTypeInfo.php.

References $description, $lng_code, and $title.

35  {
36  $this->title = $title;
37  $this->description = $description;
38  $this->lng_code = $lng_code;
39  }

Member Function Documentation

◆ getDescription()

ilStudyProgrammeTypeInfo::getDescription ( )

Definition at line 53 of file class.ilStudyProgrammeTypeInfo.php.

References $description.

Referenced by toFormInput().

53  : ?string
54  {
55  return $this->description;
56  }
+ Here is the caller graph for this function:

◆ getLanguageCode()

ilStudyProgrammeTypeInfo::getLanguageCode ( )

Definition at line 65 of file class.ilStudyProgrammeTypeInfo.php.

References $lng_code.

Referenced by toFormInput().

65  : ?string
66  {
67  return $this->lng_code;
68  }
+ Here is the caller graph for this function:

◆ getTitle()

ilStudyProgrammeTypeInfo::getTitle ( )

Definition at line 41 of file class.ilStudyProgrammeTypeInfo.php.

References $title.

Referenced by toFormInput().

41  : ?string
42  {
43  return $this->title;
44  }
+ Here is the caller graph for this function:

◆ toFormInput()

ilStudyProgrammeTypeInfo::toFormInput ( Field\Factory  $input,
ilLanguage  $lng,
Refinery  $refinery 
)

Definition at line 77 of file class.ilStudyProgrammeTypeInfo.php.

References getDescription(), getLanguageCode(), getTitle(), ilLanguage\txt(), ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation(), and ILIAS\UI\Implementation\Component\Input\withValue().

81  : FormInput {
82  $title = $input
83  ->text($lng->txt('title'), '')
84  ->withValue($this->getTitle() ?? "")
85  ->withRequired(true)
86  ;
87 
88  $description = $input
89  ->textarea($lng->txt('description'), '')
90  ->withValue($this->getDescription() ?? "")
91  ->withRequired(true)
92  ;
93 
94  $lng_code = $this->getLanguageCode() ?? "";
95 
96  return $input->section(
97  [
98  'title' => $title,
99  'description' => $description
100  ],
101  $lng->txt("meta_l_$lng_code")
102  )
103  ->withAdditionalTransformation($refinery->custom()->transformation(function ($vals) use ($lng_code) {
104  return new ilStudyProgrammeTypeInfo(
105  $vals['title'],
106  $vals['description'],
107  $lng_code
108  );
109  }));
110  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
This describes inputs that can be used in forms.
Definition: FormInput.php:32
+ Here is the call graph for this function:

◆ withDescription()

ilStudyProgrammeTypeInfo::withDescription ( string  $description)

Definition at line 58 of file class.ilStudyProgrammeTypeInfo.php.

References $description.

59  {
60  $clone = clone $this;
61  $clone->description = $description;
62  return $clone;
63  }

◆ withLanguageCode()

ilStudyProgrammeTypeInfo::withLanguageCode ( string  $lng_code)

Definition at line 70 of file class.ilStudyProgrammeTypeInfo.php.

References $lng_code.

71  {
72  $clone = clone $this;
73  $clone->lng_code = $lng_code;
74  return $clone;
75  }

◆ withTitle()

ilStudyProgrammeTypeInfo::withTitle ( string  $title)

Definition at line 46 of file class.ilStudyProgrammeTypeInfo.php.

References $title.

47  {
48  $clone = clone $this;
49  $clone->title = $title;
50  return $clone;
51  }

Field Documentation

◆ $description

string ilStudyProgrammeTypeInfo::$description
protected

Definition at line 28 of file class.ilStudyProgrammeTypeInfo.php.

Referenced by __construct(), getDescription(), and withDescription().

◆ $lng_code

string ilStudyProgrammeTypeInfo::$lng_code
protected

◆ $title

string ilStudyProgrammeTypeInfo::$title
protected

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

Referenced by __construct(), getTitle(), and withTitle().


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