ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ConditionalGotoLink.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use Closure;
26
27final class ConditionalGotoLink implements GotoLink
28{
32 public function __construct(private readonly string $name, private readonly Closure $select_target)
33 {
34 }
35
36 public function name(): string
37 {
38 return $this->name;
39 }
40
41 public function target(): Target
42 {
43 return ($this->select_target)();
44 }
45
46}