ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilScriptActivity.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 
18 {
20  private $context;
21 
23  private $method = '';
24 
26  protected $name;
27 
33  public function __construct(ilNode $context)
34  {
35  $this->context = $context;
36  }
37 
41  public function setMethod($value)
42  {
43  $this->method = $value;
44  }
45 
53  public function getScript()
54  {
55  return $this->method;
56  }
57 
63  public function execute()
64  {
66  $return_value = $this->context->getContext()->$method($this);
67  foreach((array) $return_value as $key => $value)
68  {
69  $this->context->setRuntimeVar($key, $value);
70  }
71  }
72 
78  public function getContext()
79  {
80  return $this->context;
81  }
82 
86  public function setName($name)
87  {
88  $this->name = $name;
89  }
90 
94  public function getName()
95  {
96  return $this->name;
97  }
98 }
ilWorkflowEngineElement Interface is part of the petri net based workflow engine. ...
execute()
Executes this action according to its settings.
PhpIncludeInspection
getScript()
Returns the value of the setting to be set.
PhpIncludeInspection
Definition: ilNode.php:25
Create styles array
The data for the language used.
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.