ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilStudyProgrammeTypeSettings Class Reference
+ Collaboration diagram for ilStudyProgrammeTypeSettings:

Public Member Functions

 __construct (int $type_id)
 
 getTypeId ()
 
 withTypeId (int $type_id)
 
 toFormInput (Field\Factory $input, \ilLanguage $lng, Refinery $refinery, array $sp_types)
 

Protected Attributes

 $type_id
 

Detailed Description

Definition at line 10 of file class.ilStudyProgrammeTypeSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeTypeSettings::__construct ( int  $type_id)

Definition at line 17 of file class.ilStudyProgrammeTypeSettings.php.

References $type_id.

Member Function Documentation

◆ getTypeId()

ilStudyProgrammeTypeSettings::getTypeId ( )

Definition at line 22 of file class.ilStudyProgrammeTypeSettings.php.

22 : int
23 {
24 return $this->type_id;
25 }

References $type_id.

◆ toFormInput()

ilStudyProgrammeTypeSettings::toFormInput ( Field\Factory  $input,
\ilLanguage  $lng,
Refinery  $refinery,
array  $sp_types 
)

Definition at line 34 of file class.ilStudyProgrammeTypeSettings.php.

39 : Field\Input {
40 $select = $input
41 ->select($lng->txt('type'), $sp_types, $lng->txt('prg_type_byline'))
42 ->withValue($this->getTypeId() == 0 ? "" : $this->getTypeId())
43 ->withAdditionalTransformation($refinery->custom()->transformation(function ($v) {
44 if ($v == "") {
45 return 0;
46 }
47 return $v;
48 }))
49 ;
50
51 return $input->section(
52 [
53 'type' => $select
54 ],
55 $lng->txt('prg_type')
56 )
57 ->withAdditionalTransformation($refinery->custom()->transformation(function ($vals) {
58 return new ilStudyProgrammeTypeSettings((int) $vals['type']);
59 }));
60 }
$lng

◆ withTypeId()

ilStudyProgrammeTypeSettings::withTypeId ( int  $type_id)

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

28 {
29 $clone = clone $this;
30 $clone->type_id = $type_id;
31 return $clone;
32 }

References $type_id.

Field Documentation

◆ $type_id

ilStudyProgrammeTypeSettings::$type_id
protected

Definition at line 15 of file class.ilStudyProgrammeTypeSettings.php.

Referenced by __construct(), getTypeId(), and withTypeId().


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