ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLTIConsumerProviderSelectionFormTableGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
32{
37 protected Standard $filter;
38
43 public function __construct(string $newType, ilObjLTIConsumerGUI $parentGui, string $parentCmd)
44 {
45 global $DIC;
46
48
49 $this->table = new ilLTIConsumerProviderTableGUI($parentGui, $parentCmd);
50 $this->table->enableSelectProviderForm();
51
52 $this->filter = $this->table->getFilter();
53 $filter_params = $DIC->uiService()->filter()->getData($this->filter);
54
55 $providerList = new ilLTIConsumeProviderList();
56 $providerList->setTitleFilter($filter_params['title'] ?? '');
57 $providerList->setKeywordFilter($filter_params['keywords'] ?? '');
58 $providerList->setHasOutcomeFilter(($filter_params['outcome'] ?? '') === '' ? null : $filter_params['outcome'] === 'yes');
59 $providerList->setIsExternalFilter(($filter_params['internal'] ?? '') === '' ? null : $filter_params['internal'] !== 'yes');
60 $providerList->setIsProviderKeyCustomizableFilter(($filter_params['with_key'] ?? '') === '' ? null : $filter_params['with_key'] === 'yes');
61 $providerList->setCategoryFilter($filter_params['category'] ?? '');
62
63 $providerList->load();
64
65 $data = $providerList->getTableData();
66
67 foreach ($data as $key => $value) {
68 $data[$key]["own_provider"] = $value['creator'] == $DIC->user()->getId();
69 }
70
71 $this->table->setData($data);
72
73 $this->setTitle($DIC->language()->txt($newType . '_select_provider'));
74 }
75
79 public function getHTML(): string
80 {
81 global $DIC;
82
83 return "<div style='margin: 15px'>" . $DIC->ui()->renderer()->render($this->filter) . $this->table->getHTML() . "</div>";
84 }
85}
__construct(string $newType, ilObjLTIConsumerGUI $parentGui, string $parentCmd)
ilLTIConsumerProviderSelectionFormGUI constructor.
This class represents a property form user interface.
This describes a standard filter.
Definition: Standard.php:27
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
global $DIC
Definition: shib_login.php:26