ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
RequestToItems.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
28 
33 {
34  use RIDHelper;
35 
36  private \ILIAS\ResourceStorage\Services $irss;
37 
38  public function __construct(
39  private Request $request,
40  private Factory $ui_factory,
41  private \ilLanguage $language,
42  private Services $http,
43  private TableDataProvider $data_provider,
44  private ActionBuilder $action_builder,
45  private ViewControlBuilder $view_control_builder,
46  private UploadBuilder $upload_builder
47  ) {
48  global $DIC;
49  $this->irss = $DIC->resourceStorage();
50  }
51 
52  protected function buildItemGroup(): \ILIAS\UI\Component\Item\Group
53  {
54  $items = [];
55  foreach ($this->data_provider->getIdentifications() as $resource_identification) {
56  $revision_to_card = new RevisionToComponent($this->getCurrentRevision($resource_identification));
57  $items[] = $revision_to_card->getAsItem(true)
58  ->withActions(
59  $this->action_builder->buildDropDownForResource($resource_identification)
60  );
61  }
62 
63  return $this->ui_factory->item()->group('', $items);
64  }
65 
66  public function getComponents(): \Generator
67  {
68  yield from $this->upload_builder->getDropZone();
69 
70  yield $this->ui_factory->panel()->standard(
71  $this->request->getTitle(),
72  $this->buildItemGroup()
73  )->withViewControls([
74  $this->view_control_builder->getPagination(),
75  $this->view_control_builder->getSortation()
76  ]);
77  // Modals must be rendered after the panel, otherwise there are no modals
78  yield from $this->action_builder->getModals();
79  }
80 }
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
$http
Definition: raiseError.php:7
__construct(private Request $request, private Factory $ui_factory, private \ilLanguage $language, private Services $http, private TableDataProvider $data_provider, private ActionBuilder $action_builder, private ViewControlBuilder $view_control_builder, private UploadBuilder $upload_builder)