19declare(strict_types=1);
40 public const string TABLE_NS =
'cond_trigger_table';
66 $this->
lng = $DIC->language();
67 $this->
lng->loadLanguageModule(
'rbac');
68 $this->
user = $DIC->user();
69 $this->
ctrl = $DIC->ctrl();
70 $this->ui_factory =
$DIC->ui()->factory();
71 $this->data_factory =
new DataFactory();
72 $this->ui_renderer =
$DIC->ui()->renderer();
73 $this->http_request =
$DIC->http()->request();
79 array $visible_column_ids,
83 ?array $additional_parameters
85 $records = $this->provider->limitData(
$range, $order);
86 foreach ($records as $row) {
94 return count($this->provider->getData());
100 'trigger' => $this->ui_factory
103 ->link($this->
lng->txt(
'rbac_precondition_source')),
104 'condition' => $this->ui_factory
107 ->text($this->
lng->txt(
'rbac_precondition_condition'))
108 ->withIsSortable(
true),
109 'obligatory' => $this->ui_factory
112 ->statusIcon($this->
lng->txt(
'precondition_obligatory'))
113 ->withIsSortable(
false)
122 $uri_command_handler = $this->data_factory->uri(
123 ILIAS_HTTP_PATH .
'/' . $this->
ctrl->getLinkTargetByClass(
124 ilConditionHandlerGUI::class,
125 'handleConditionTriggerTableActions'
130 $action_parameter_token,
133 (
new URLBuilder($uri_command_handler))->acquireParameters(
139 $actions[
'edit'] = $this->ui_factory->table()->action()->single(
140 $this->
lng->txt(
'edit'),
141 $url_builder->withParameter($action_parameter_token,
'editConditionTrigger'),
144 if ($this->allow_optional_conditions) {
145 $actions[
'saveCompulsory'] = $this->ui_factory->table()->action()->multi(
146 $this->
lng->txt(
'rbac_precondition_save_obligatory'),
147 $url_builder->withParameter($action_parameter_token,
'saveCompulsory'),
151 $actions[
'confirmDeleteConditionTrigger'] = $this->ui_factory->table()->action()->standard(
152 $this->
lng->txt(
'delete'),
153 $url_builder->withParameter($action_parameter_token,
'confirmDeleteConditionTrigger'),
162 return $this->ui_factory
166 $this->
lng->txt(
'active_preconditions'),
169 ->withId(self::class)
170 ->withActions($this->getActions())
171 ->withRequest($this->http_request);
177 return $this->ui_renderer->render(
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Psr Http Message ServerRequestInterface $http_request
bool $allow_optional_conditions
DataFactory $data_factory
getTotalRowCount(?array $filter_data, ?array $additional_parameters)
Mainly for the purpose of pagination-support, it is important to know about the total number of recor...
ILIAS UI Factory $ui_factory
ILIAS UI Renderer $ui_renderer
__construct(ConditionTriggerProvider $provider, bool $allow_optional_conditions)
getRows(DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, ?array $filter_data, ?array $additional_parameters)
This is called by the table to retrieve rows; map data-records to rows using the $row_builder e....
ConditionTriggerProvider $provider
const string ACTION_TOKEN
const string ACTION_TOKEN_NS
Both the subject and the direction need to be specified when expressing an order.
A simple class to express a naive range of whole positive numbers.
class ilConditionHandlerGUI
Class ilCtrl provides processing control methods.
buildDataRow(string $id, array $record)
This describes a Data Table.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...