ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
RequestForForm.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use Psr\Http\Message\ServerRequestInterface as Request;
26use ILIAS\UI\Component\Modal\RoundTrip as RoundtripModal;
27
29{
30 protected Request $request;
31 protected ?PathInterface $path;
32
33 public function __construct(
34 Request $request,
35 ?PathInterface $path = null
36 ) {
37 $this->request = $request;
38 $this->path = $path;
39 }
40
41 public function path(): ?PathInterface
42 {
43 return $this->path;
44 }
45
46 public function applyRequestToForm(StandardForm $form): StandardForm
47 {
48 return $form->withRequest($this->request);
49 }
50
51 public function applyRequestToModal(RoundtripModal $modal): RoundtripModal
52 {
53 return $modal->withRequest($this->request);
54 }
55}
__construct(Request $request, ?PathInterface $path=null)
This describes a standard form.
Definition: Standard.php:29