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,
82 mixed $additional_viewcontrol_data,
84 mixed $additional_parameters
86 $records = $this->provider->limitData(
$range, $order);
87 foreach ($records as $row) {
94 mixed $additional_viewcontrol_data,
96 mixed $additional_parameters
98 return count($this->provider->getData());
104 'trigger' => $this->ui_factory
107 ->link($this->
lng->txt(
'rbac_precondition_source')),
108 'condition' => $this->ui_factory
111 ->text($this->
lng->txt(
'rbac_precondition_condition'))
112 ->withIsSortable(
true),
113 'obligatory' => $this->ui_factory
116 ->statusIcon($this->
lng->txt(
'precondition_obligatory'))
117 ->withIsSortable(
false)
126 $uri_command_handler = $this->data_factory->uri(
127 ILIAS_HTTP_PATH .
'/' . $this->
ctrl->getLinkTargetByClass(
128 ilConditionHandlerGUI::class,
129 'handleConditionTriggerTableActions'
134 $action_parameter_token,
137 (
new URLBuilder($uri_command_handler))->acquireParameters(
143 $actions[
'edit'] = $this->ui_factory->table()->action()->single(
144 $this->
lng->txt(
'edit'),
145 $url_builder->withParameter($action_parameter_token,
'editConditionTrigger'),
148 if ($this->allow_optional_conditions) {
149 $actions[
'saveCompulsory'] = $this->ui_factory->table()->action()->multi(
150 $this->
lng->txt(
'rbac_precondition_save_obligatory'),
151 $url_builder->withParameter($action_parameter_token,
'saveCompulsory'),
155 $actions[
'confirmDeleteConditionTrigger'] = $this->ui_factory->table()->action()->standard(
156 $this->
lng->txt(
'delete'),
157 $url_builder->withParameter($action_parameter_token,
'confirmDeleteConditionTrigger'),
166 return $this->ui_factory
170 $this->
lng->txt(
'active_preconditions'),
173 ->withId(self::class)
174 ->withActions($this->getActions())
175 ->withRequest($this->http_request);
181 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(mixed $additional_viewcontrol_data, mixed $filter_data, mixed $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, mixed $additional_viewcontrol_data, mixed $filter_data, mixed $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.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...