ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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

References $description, $lng_code, and $title.

Member Function Documentation

◆ getDescription()

ilStudyProgrammeTypeInfo::getDescription ( )

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

53 : ?string
54 {
55 return $this->description;
56 }

References $description.

◆ getLanguageCode()

ilStudyProgrammeTypeInfo::getLanguageCode ( )

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

65 : ?string
66 {
67 return $this->lng_code;
68 }

References $lng_code.

◆ getTitle()

ilStudyProgrammeTypeInfo::getTitle ( )

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

41 : ?string
42 {
43 return $this->title;
44 }

References $title.

◆ toFormInput()

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

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

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'],
108 );
109 }));
110 }
This describes inputs that can be used in forms.
Definition: FormInput.php:33
global $lng
Definition: privfeed.php:31

References $lng_code.

◆ withDescription()

ilStudyProgrammeTypeInfo::withDescription ( string  $description)

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

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

References $description.

◆ withLanguageCode()

ilStudyProgrammeTypeInfo::withLanguageCode ( string  $lng_code)

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

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

References $lng_code.

◆ withTitle()

ilStudyProgrammeTypeInfo::withTitle ( string  $title)

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

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

References $title.

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: