19declare(strict_types=1);
35 private readonly array
$all;
51 return $this->current->intercept();
56 $target = $this->current->target();
57 $this->
ctrl->setParameterByClass($target->guiName(),
'id', $this->current->id());
58 $this->
ctrl->redirectToURL($this->
ctrl->getLinkTargetByClass($target->guiPath(), $target->command()));
64 strtolower($this->
ctrl->getCmdClass() ??
''),
65 $this->allInterceptingPaths(),
76 fn($intercept) => strtolower($intercept->target()->guiName()),
77 array_filter($this->all, fn($i) => $i->intercept())
84 fn($x) => $x->intercept(),
98 private function find(Closure $predicate, array $array):
Result
100 foreach ($array as $x) {
101 if ($predicate($x)) {
105 return new Error(
'Not found.');
A result encapsulates a value or an error and simplifies the handling of those.
find(Closure $predicate, array $array)
@template A
shouldStoreRequestTarget()
readonly Intercept $current
__construct(private readonly ilCtrl $ctrl, Conductor $legal_documents)
Class ilCtrl provides processing control methods.
A result encapsulates a value or an error and simplifies the handling of those.