19declare(strict_types=1);
40 protected UIFactory $ui_factory,
55 $delete_modal = $this->actions->getModal()->delete(
61 $buttons[] = $this->actions->getButton()->delete(
62 $delete_modal->getFlexibleSignal(),
69 if (!$sub->isScaffold()) {
72 $create_modal = $this->actions->getModal()->create(
77 $buttons[] = $this->actions->getButton()->create(
78 $create_modal->getFlexibleSignal(),
84 $dropdown = $this->ui_factory->dropdown()->standard($buttons);
87 $panel = $this->ui_factory->panel()->sub(
88 $this->presenter->elements()->nameWithRepresentation(
false, $element),
89 $this->listing($element) ?? []
90 )->withActions($dropdown);
92 $panel = $this->ui_factory->panel()->standard(
93 $this->presenter->elements()->nameWithParents($element),
94 $this->listing($element) ?? []
95 )->withActions($dropdown);
97 yield ContentType::MAIN => $panel;
103 $properties = $this->properties_fetcher->getPropertiesByPreview($element);
104 $properties = iterator_to_array($properties);
105 if (!empty($properties)) {
106 return $this->ui_factory->listing()
107 ->characteristicValue()
Builds a Color from either hex- or rgb values.
content(PathInterface $base_path, ElementInterface $element, bool $is_subpanel, ?RequestForFormInterface $request)
listing(ElementInterface $element)
__construct(protected Actions $actions, protected PropertiesFetcher $properties_fetcher, protected UIFactory $ui_factory, protected PresenterInterface $presenter)
This describes how a panel could be modified during construction of UI.