4include_once(
"Services/Table/classes/class.ilTable2GUI.php");
 
    5include_once(
"./Services/Badge/classes/class.ilBadge.php");
 
   19        function __construct($a_parent_obj, $a_parent_cmd = 
"", $a_has_write = 
false)
 
   23                $this->
setId(
"bdgobdg");
 
   24                $this->has_write = (bool)$a_has_write;
 
   26                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   30                $this->
setTitle($lng->txt(
"badge_object_badges"));
 
   37                $this->
addColumn($lng->txt(
"title"), 
"title");
 
   38                $this->
addColumn($lng->txt(
"type"), 
"type");
 
   39                $this->
addColumn($lng->txt(
"object"), 
"container");             
 
   40                $this->
addColumn($lng->txt(
"active"), 
"active");
 
   41                $this->
addColumn($lng->txt(
"action"), 
"");              
 
   46                        $this->
addMultiCommand(
"deactivateObjectBadges", $lng->txt(
"deactivate"));      
 
   47                        $this->
addMultiCommand(
"confirmDeleteObjectBadges", $lng->txt(
"delete"));       
 
   52                $this->
setRowTemplate(
"tpl.object_badge_row.html", 
"Services/Badge");   
 
   68                $this->filter[
"title"] = 
$title->getValue();
 
   71                $this->filter[
"object"] = $object->getValue();
 
   73                $lng->loadLanguageModule(
"search");
 
   76                        "" => 
$lng->txt(
"search_any"),
 
   81                        if(!in_array(
"bdga", $type->getValidObjectTypes()))
 
   90                $this->filter[
"type"] = $type->getValue();                                              
 
   95                global 
$lng, $ilAccess;
 
   97                $data = $filter_types = array();
 
  101                include_once 
"Services/Badge/classes/class.ilBadgeRenderer.php";
 
  102                include_once 
"Services/Link/classes/class.ilLink.php";
 
  107                        $container_url = 
null;
 
  108                        $container = 
'<img src="'.
 
  110                                        '" alt="'.$lng->txt(
"obj_".$badge_item[
"parent_type"]).
 
  111                                        '" title="'.$lng->txt(
"obj_".$badge_item[
"parent_type"]).
'" /> '.
 
  112                                        $badge_item[
"parent_title"];
 
  114                        if((
bool)$badge_item[
"deleted"])
 
  116                                $container .=  
' <span class="il_ItemAlertProperty">'.$lng->txt(
"deleted").
'</span>';
 
  121                                if($ilAccess->checkAccess(
"read", 
"", 
$ref_id))
 
  130                                "id" => $badge_item[
"id"],
 
  131                                "active"=> $badge_item[
"active"],
 
  132                                "type" => $type_caption,
 
  133                                "title" => $badge_item[
"title"],
 
  134                                "container_meta" => $container,
 
  135                                "container_url" => $container_url,
 
  136                                "container_id" => $badge_item[
"parent_id"],
 
  140                        $filter_types[$badge_item[
"type_id"]] = $type_caption;
 
  150                if($a_set[
"container_url"])
 
  152                        $this->tpl->setCurrentBlock(
"container_link_bl");
 
  153                        $this->tpl->setVariable(
"TXT_CONTAINER", $a_set[
"container_meta"]);     
 
  154                        $this->tpl->setVariable(
"URL_CONTAINER", $a_set[
"container_url"]);      
 
  155                        $this->tpl->parseCurrentBlock();
 
  159                        $this->tpl->setCurrentBlock(
"container_nolink_bl");
 
  160                        $this->tpl->setVariable(
"TXT_CONTAINER_STATIC", $a_set[
"container_meta"]);                              
 
  161                        $this->tpl->parseCurrentBlock();
 
  166                        $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
 
  169                $this->tpl->setVariable(
"PREVIEW", $a_set[
"renderer"]->
getHTML());      
 
  170                $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);  
 
  171                $this->tpl->setVariable(
"TXT_TYPE", $a_set[
"type"]);    
 
  172                $this->tpl->setVariable(
"TXT_ACTIVE", $a_set[
"active"]
 
  184                        $this->tpl->setVariable(
"TXT_LIST", 
$lng->txt(
"users"));        
 
  185                        $this->tpl->setVariable(
"URL_LIST", 
$url);      
 
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Constructor.
static getExtendedTypeCaption(ilBadgeType $a_type)
static getObjectInstances(array $a_filter=null)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
TableGUI class for badge listing.
__construct($a_parent_obj, $a_parent_cmd="", $a_has_write=false)
Constructor.
fillRow($a_set)
Standard Version of Fill Row.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _getAllReferences($a_id)
get all reference ids of object
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.
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=NULL)
Add filter by standard type.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
if(!is_array($argv)) $options