31 string $a_parent_cmd =
"",
32 int $a_parent_obj_id = 0,
33 bool $a_has_write =
false 37 $this->
ctrl = $DIC->ctrl();
38 $this->
lng = $DIC->language();
39 $ilCtrl = $DIC->ctrl();
40 $lng = $DIC->language();
42 $this->
setId(
"bdgbdg");
43 $this->has_write = $a_has_write;
52 if ($this->has_write) {
60 if ($this->has_write) {
91 $valid_types = $handler->getAvailableTypesForObjType($this->parent_type);
93 count($valid_types) > 1) {
96 $options = array(
"" =>
$lng->
txt(
"search_any"));
97 foreach ($valid_types as
$id =>
$type) {
103 $type->setOptions($options);
104 $this->filter[
"type"] =
$type->getValue();
108 public function getItems(
int $a_parent_obj_id): void
114 "id" => $badge->getId(),
115 "title" => $badge->getTitle(),
116 "active" => $badge->isActive(),
117 "type" => ($this->parent_type !==
"bdga")
119 : $badge->getTypeInstance()->getCaption(),
120 "manual" => (!$badge->getTypeInstance() instanceof
ilBadgeAuto),
128 protected function fillRow(array $a_set): void
133 if ($this->has_write) {
134 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
137 $this->tpl->setVariable(
"PREVIEW", $a_set[
"renderer"]->
getHTML());
138 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
139 $this->tpl->setVariable(
"TXT_TYPE", $a_set[
"type"]);
140 $this->tpl->setVariable(
"TXT_ACTIVE", $a_set[
"active"]
144 if ($this->has_write) {
146 $actions->setListTitle(
$lng->
txt(
"actions"));
148 if ($a_set[
"manual"] &&
155 $actions->addItem(
$lng->
txt(
"badge_award_badge"),
"",
$url);
163 $this->tpl->setVariable(
"ACTIONS", $actions->getHTML());
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
setResetCommand(string $a_val, string $a_caption="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
static getExtendedTypeCaption(ilBadgeType $a_type)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setFilterCommand(string $a_val, string $a_caption="")
static getInstancesByParentId(int $a_parent_id, array $a_filter=null)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
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)
getItems(int $a_parent_obj_id)
static _lookupType(int $id, bool $reference=false)
addMultiCommand(string $a_cmd, string $a_text)
__construct(object $a_parent_obj, string $a_parent_cmd="", int $a_parent_obj_id=0, bool $a_has_write=false)