4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"./Services/Badge/classes/class.ilBadge.php");
29 public function __construct($a_parent_obj, $a_parent_cmd =
"", $a_has_write =
false)
33 $this->ctrl = $DIC->ctrl();
34 $this->lng = $DIC->language();
35 $this->access = $DIC->access();
37 $lng = $DIC->language();
39 $this->
setId(
"bdgobdg");
40 $this->has_write = (bool) $a_has_write;
42 parent::__construct($a_parent_obj, $a_parent_cmd);
48 if ($this->has_write) {
58 if ($this->has_write) {
66 $this->
setRowTemplate(
"tpl.object_badge_row.html",
"Services/Badge");
82 $this->filter[
"title"] =
$title->getValue();
85 $this->filter[
"object"] = $object->getValue();
87 $lng->loadLanguageModule(
"search");
90 "" =>
$lng->txt(
"search_any"),
94 if (!in_array(
"bdga",
$type->getValidObjectTypes())) {
102 $this->filter[
"type"] =
$type->getValue();
114 include_once
"Services/Badge/classes/class.ilBadgeRenderer.php";
115 include_once
"Services/Link/classes/class.ilLink.php";
119 $container_url = null;
122 '" alt="' .
$lng->txt(
"obj_" . $badge_item[
"parent_type"]) .
123 '" title="' .
$lng->txt(
"obj_" . $badge_item[
"parent_type"]) .
'" /> ' .
124 $badge_item[
"parent_title"];
126 if ((
bool) $badge_item[
"deleted"]) {
127 $container .=
' <span class="il_ItemAlertProperty">' .
$lng->txt(
"deleted") .
'</span>';
130 if ($ilAccess->checkAccess(
"read",
"", $ref_id)) {
138 "id" => $badge_item[
"id"],
139 "active"=> $badge_item[
"active"],
140 "type" => $type_caption,
141 "title" => $badge_item[
"title"],
143 "container_url" => $container_url,
144 "container_id" => $badge_item[
"parent_id"],
148 $filter_types[$badge_item[
"type_id"]] = $type_caption;
159 if ($a_set[
"container_url"]) {
160 $this->tpl->setCurrentBlock(
"container_link_bl");
161 $this->tpl->setVariable(
"TXT_CONTAINER", $a_set[
"container_meta"]);
162 $this->tpl->setVariable(
"URL_CONTAINER", $a_set[
"container_url"]);
163 $this->tpl->parseCurrentBlock();
165 $this->tpl->setCurrentBlock(
"container_nolink_bl");
166 $this->tpl->setVariable(
"TXT_CONTAINER_STATIC", $a_set[
"container_meta"]);
167 $this->tpl->parseCurrentBlock();
170 if ($this->has_write) {
171 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
174 $this->tpl->setVariable(
"PREVIEW", $a_set[
"renderer"]->
getHTML());
175 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
176 $this->tpl->setVariable(
"TXT_TYPE", $a_set[
"type"]);
177 $this->tpl->setVariable(
"TXT_ACTIVE", $a_set[
"active"]
181 if ($this->has_write) {
188 $this->tpl->setVariable(
"TXT_LIST",
$lng->txt(
"users"));
189 $this->tpl->setVariable(
"URL_LIST",
$url);
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static getObjectInstances(array $a_filter=null)
if(!array_key_exists('StateId', $_REQUEST)) $id
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
getParentObject()
Get parent object.
static _getAllReferences($a_id)
get all reference ids of object
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
static getExtendedTypeCaption(ilBadgeType $a_type)
addMultiCommand($a_cmd, $a_text)
Add Command button.
__construct($a_parent_obj, $a_parent_cmd="", $a_has_write=false)
TableGUI class for badge listing.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
setLimit($a_limit=0, $a_default_limit=0)
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
static getInstance()
Constructor.
setFilterCommand($a_val, $a_caption=null)
Set filter command.