ILIAS  release_7 Revision v7.30-3-g800a261c036
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

 $title
 
 $description
 
 $lng_code
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ getDescription()

ilStudyProgrammeTypeInfo::getDescription ( )

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

48 : ?string
49 {
50 return $this->description;
51 }

References $description.

◆ getLanguageCode()

ilStudyProgrammeTypeInfo::getLanguageCode ( )

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

60 : ?string
61 {
62 return $this->lng_code;
63 }

References $lng_code.

◆ getTitle()

ilStudyProgrammeTypeInfo::getTitle ( )

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

36 : ?string
37 {
38 return $this->title;
39 }

References $title.

◆ toFormInput()

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

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

76 : Field\Input {
77 $title = $input
78 ->text($lng->txt('title'), '')
79 ->withValue($this->getTitle() ? $this->getTitle() : "")
80 ->withRequired(true)
81 ;
82
83 $description = $input
84 ->textarea($lng->txt('description'), '')
85 ->withValue($this->getDescription() ? $this->getDescription() : "")
86 ->withRequired(true)
87 ;
88
89 $lng_code = $this->getLanguageCode() ? $this->getLanguageCode() : "";
90
91 return $input->section(
92 [
93 'title' => $title,
94 'description' => $description
95 ],
96 $lng->txt("meta_l_{$lng_code}")
97 )
98 ->withAdditionalTransformation($refinery->custom()->transformation(function ($vals) use ($lng_code) {
99 return new ilStudyProgrammeTypeInfo(
100 $vals['title'],
101 $vals['description'],
103 );
104 }));
105 }
$lng

References $lng_code.

◆ withDescription()

ilStudyProgrammeTypeInfo::withDescription ( ?string  $description)

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

54 {
55 $clone = clone $this;
56 $clone->description = $description;
57 return $clone;
58 }

References $description.

◆ withLanguageCode()

ilStudyProgrammeTypeInfo::withLanguageCode ( ?string  $lng_code)

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

66 {
67 $clone = clone $this;
68 $clone->lng_code = $lng_code;
69 return $clone;
70 }

References $lng_code.

◆ withTitle()

ilStudyProgrammeTypeInfo::withTitle ( ?string  $title)

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

42 {
43 $clone = clone $this;
44 $clone->title = $title;
45 return $clone;
46 }

References $title.

Field Documentation

◆ $description

ilStudyProgrammeTypeInfo::$description
protected

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

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

◆ $lng_code

ilStudyProgrammeTypeInfo::$lng_code
protected

◆ $title

ilStudyProgrammeTypeInfo::$title
protected

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

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


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