ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ConditionalGotoLink.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use Closure;
26 
27 final 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 }