19 declare(strict_types=1);
48 $this->positionRepo =
$dic[
"repo.Positions"];
49 $this->dropdownbuilder =
$dic[
'dropdownbuilder'];
52 $this->
setId(
'orgu_types_table');
55 $this->
addColumn($this->
lng->txt(
'action'),
'',
'100px',
false,
'text-right');
64 public function fillRow(array $a_set):
void 69 $position = $this->positionRepo->getSingle($a_set[
"id"],
'id');
71 $this->tpl->setVariable(
'TITLE', $position->getTitle());
72 $this->tpl->setVariable(
'DESCRIPTION', $position->getDescription());
73 $this->tpl->setVariable(
'AUTHORITIES', implode(
"<br>", $this->
getAuthorityDescription($position->getAuthorities())));
75 $this->
ctrl->setParameterByClass(ilOrgUnitPositionGUI::class, BaseCommands::AR_ID, $a_set[
'id']);
77 $dropdownbuilder = $this->dropdownbuilder
85 !$position->isCorePosition()
88 $this->tpl->setVariable(
'ACTIONS', $dropdownbuilder);
93 foreach ($this->columns as
$column) {
103 $this->
setData($this->positionRepo->getArray());
114 $lang->loadLanguageModule(
'orgu');
123 foreach ($lang_keys as
$key) {
127 $authority_description = [];
128 foreach ($authorities as $authority) {
129 switch ($authority->getOver()) {
131 $over_txt = $t[
"over_" . $authority->getOver()];
134 $over_txt = $this->positionRepo
135 ->getSingle($authority->getOver(),
'id')
140 $authority_description[] =
" " . $t[
"over"] .
" " . $over_txt .
" " . $t[
"in"] .
" " . $t[
"scope_" . $authority->getScope()];
143 return $authority_description;
setFormAction(string $a_form_action, bool $a_multipart=false)
DropdownBuilder $dropdownbuilder
__construct(BaseCommands $parent_obj, $parent_cmd)
ilOrgUnitPositionTableGUI constructor.
withItem(string $label_lang_var, string $url, bool $condition=true)
This is to construct/collect the entries (=Links) of a row's action-dropdown.
fillRow(array $a_set)
Standard Version of Fill Row.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
getAuthorityDescription(array $authorities)
Returns descriptions for authorities as an array of strings.
ilOrgUnitPositionDBRepository $positionRepo
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
buildData()
Build and set data for table.
Class ilOrgUnitPositionTableGUI.
const CMD_CONFIRM_DELETION
const SCOPE_SUBSEQUENT_ORGUS
setPrefix(string $a_prefix)