ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FormContent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27use ILIAS\MetaData\Editor\Full\Services\Services as FullEditorServices;
30
32{
33 protected FullEditorServices $services;
34
35 public function __construct(
36 FullEditorServices $services
37 ) {
38 $this->services = $services;
39 }
40
44 public function content(
45 PathInterface $base_path,
46 ElementInterface $element,
48 ): \Generator {
49 $delete_modal = $this->services->actions()->getModal()->delete(
50 $base_path,
51 $element,
52 true
53 );
54 if ($delete_modal) {
55 $button = $this->services->actions()->getButton()->delete(
56 $delete_modal->getFlexibleSignal(),
57 false,
58 true
59 );
60 yield ContentType::MODAL => $delete_modal;
61 yield ContentType::TOOLBAR => $button;
62 }
63 $form = $this->services->formFactory()->getUpdateForm(
64 $base_path,
65 $element
66 );
67 if ($request) {
68 $form = $request->applyRequestToForm($form);
69 }
70 yield ContentType::MAIN => $form;
71 }
72}
__construct(FullEditorServices $services)
Definition: FormContent.php:35
content(PathInterface $base_path, ElementInterface $element, ?RequestForFormInterface $request)
Definition: FormContent.php:44
return true
This describes commonalities between standard and primary buttons.
Definition: Button.php:34
This describes a standard form.
Definition: Standard.php:29