19declare(strict_types=1);
73 bool $add_as_first =
false
75 return $this->withNextStepFromName(
83 return $this->withNextStepFromName(
91 bool $add_as_first =
false
93 $builder = $this->withNextStepFromName($next_step->name(), $add_as_first);
94 foreach ($next_step->
filters() as $filter) {
110 if (!isset($this->current_step_name)) {
111 throw new \ilMDPathException(
112 'Cannot add filter because there is no current step.'
115 $clone = clone $this;
116 $clone->current_step_filters[] =
new Filter(
128 return $this->getFinishedPath(
true);
136 return $this->getFinishedPath(
false);
141 $clone = $this->withCurrentStepSaved();
144 $clone->leads_to_one,
148 if ($validate && !
$path->isRelative()) {
149 $this->validatePathFromRoot(
$path);
159 $element = $this->structure->getRoot();
160 foreach (
$path->steps() as $step) {
161 $name = $step->name();
163 $element = $element->getSuperElement();
165 $element = $element->getSubElement($name);
167 if (is_null($element)) {
168 $name = is_string($name) ? $name : $name->value;
169 throw new \ilMDPathException(
170 "In the path '" .
$path->toString() .
"', the step '" . $name .
"' is invalid."
178 bool $add_as_first =
false
180 $clone = $this->withCurrentStepSaved();
181 $clone->current_step_name = $name;
182 $clone->current_add_as_first = $add_as_first;
188 $clone = clone $this;
189 if (!isset($clone->current_step_name)) {
193 $new_step =
new Step(
194 $clone->current_step_name,
195 ...$clone->current_step_filters
197 if ($clone->current_add_as_first) {
198 array_unshift($clone->steps, $new_step);
200 $clone->steps[] = $new_step;
203 $clone->current_step_name =
null;
204 $clone->current_step_filters = [];
205 $clone->current_add_as_first =
false;
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))