ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilSettingActivity.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
5 require_once './Services/WorkflowEngine/interfaces/ilActivity.php';
7 require_once './Services/WorkflowEngine/interfaces/ilNode.php';
8 
22 {
24  private $context;
25 
33  private $setting_name = '';
34 
42  private $setting_value = '';
43 
45  protected $name;
46 
52  public function __construct(ilNode $context)
53  {
54  $this->context = $context;
55  }
56 
66  public function setSettingName($name)
67  {
68  $this->setting_name = $name;
69  }
70 
78  public function getSettingName()
79  {
80  return $this->setting_name;
81  }
82 
83  /***
84  * Sets the value of the setting.
85  *
86  * @see $setting_value
87  *
88  * @param string $value Value to be set.
89  *
90  * @return void
91  */
92  public function setSettingValue($value)
93  {
94  $this->setting_value = $value;
95  }
96 
104  public function getSettingValue()
105  {
106  return $this->setting_value;
107  }
108 
117  public function setSetting($name, $value)
118  {
119  $this->setSettingName($name);
120  $this->setSettingValue($value);
121  }
122 
130  public function execute()
131  {
132  global $DIC;
134  $ilSetting = $DIC['ilSetting'];
135 
136  $ilSetting->set($this->setting_name, $this->setting_value);
137  }
138 
144  public function getContext()
145  {
146  return $this->context;
147  }
148 
152  public function setName($name)
153  {
154  $this->name = $name;
155  }
156 
160  public function getName()
161  {
162  return $this->name;
163  }
164 }
ilWorkflowEngineElement Interface is part of the petri net based workflow engine. ...
global $DIC
Definition: saml.php:7
getSettingValue()
Returns the value of the setting to be set.
setSetting($name, $value)
Sets the setting name and value for this activity.
PhpIncludeInspection
getSettingName()
Returns the name of the setting to be written to.
setSettingName($name)
Sets the name of the setting to be written to.
PhpIncludeInspection
Definition: ilNode.php:25
global $ilSetting
Definition: privfeed.php:17
getContext()
Returns a reference to the parent node.
ilActivity Interface is part of the petri net based workflow engine.
Definition: ilActivity.php:15
__construct(ilNode $context)
Default constructor.