ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
5require_once './Services/WorkflowEngine/interfaces/ilActivity.php';
7require_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 $this->context->setRuntimeVar($key, $value);
69 }
70 }
71
77 public function getContext()
78 {
79 return $this->context;
80 }
81
85 public function setName($name)
86 {
87 $this->name = $name;
88 }
89
93 public function getName()
94 {
95 return $this->name;
96 }
97}
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
getScript()
Returns the value of the setting to be set.
__construct(ilNode $context)
Default constructor.
execute()
Executes this action according to its settings.
getContext()
Returns a reference to the parent node.
ilActivity Interface is part of the petri net based workflow engine.
Definition: ilActivity.php:16
@noinspection PhpIncludeInspection
Definition: ilNode.php:26
ilWorkflowEngineElement Interface is part of the petri net based workflow engine.