ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
trait.ModeProviderBase.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Survey\Mode;
22 
24 
28 trait ModeProviderBase
29 {
30  protected ?int $id = null;
34 
35  public function getId(): int
36  {
37  return $this->id;
38  }
39 
40  public function getFeatureConfig(): FeatureConfig
41  {
42  return $this->feature_config;
43  }
44 
45  public function getUIModifier(): UIModifier
46  {
47  $mod = $this->ui_modifier;
48  $mod->setInternalService($this->service);
49  return $mod;
50  }
51 
52  public function setInternalService(InternalService $service): void
53  {
54  $this->service = $service;
55  }
56 
57  public function getTitle() : string {
58  $lng = $this->service->domain()->lng();
59  switch ($this->getId()) {
60  case 1:
61  return $lng->txt("survey_360_mode");
62  case 2:
63  return $lng->txt("svy_self_ev_mode");
64  case 3:
65  return $lng->txt("svy_ind_feedb_mode");
66  default:
67  return $lng->txt("default");
68  }
69  }
70 }
setInternalService(InternalService $internal_service)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setInternalService(InternalService $service)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
global $lng
Definition: privfeed.php:32