ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables 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

 $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 
)

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

References $description, $lng_code, and $title.

Member Function Documentation

◆ getDescription()

ilStudyProgrammeTypeInfo::getDescription ( )

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

References $description.

Referenced by toFormInput().

48  : ?string
49  {
50  return $this->description;
51  }
+ Here is the caller graph for this function:

◆ getLanguageCode()

ilStudyProgrammeTypeInfo::getLanguageCode ( )

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

References $lng_code.

Referenced by toFormInput().

60  : ?string
61  {
62  return $this->lng_code;
63  }
+ Here is the caller graph for this function:

◆ getTitle()

ilStudyProgrammeTypeInfo::getTitle ( )

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

References $title.

Referenced by toFormInput().

36  : ?string
37  {
38  return $this->title;
39  }
+ Here is the caller graph for this function:

◆ toFormInput()

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

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

References $description, $lng_code, $title, getDescription(), getLanguageCode(), getTitle(), and ilLanguage\txt().

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'],
102  $lng_code
103  );
104  }));
105  }
$lng
+ Here is the call graph for this function:

◆ withDescription()

ilStudyProgrammeTypeInfo::withDescription ( ?string  $description)

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

References $description.

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

◆ withLanguageCode()

ilStudyProgrammeTypeInfo::withLanguageCode ( ?string  $lng_code)

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

References $lng_code.

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

◆ withTitle()

ilStudyProgrammeTypeInfo::withTitle ( ?string  $title)

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

References $title.

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

Field Documentation

◆ $description

ilStudyProgrammeTypeInfo::$description
protected

◆ $lng_code

ilStudyProgrammeTypeInfo::$lng_code
protected

◆ $title

ilStudyProgrammeTypeInfo::$title
protected

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

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


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