ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

18  {
19  $this->type_id = $type_id;
20  }

Member Function Documentation

◆ getTypeId()

ilStudyProgrammeTypeSettings::getTypeId ( )

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

References $type_id.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ toFormInput()

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

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

References getTypeId(), and ilLanguage\txt().

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
+ Here is the call graph for this function:

◆ withTypeId()

ilStudyProgrammeTypeSettings::withTypeId ( int  $type_id)

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

References $type_id.

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

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: