4include_once(
"Services/Table/classes/class.ilTable2GUI.php");
 
    5include_once(
"./Services/Badge/classes/class.ilBadge.php");
 
   20        function __construct($a_parent_obj, $a_parent_cmd = 
"", $a_parent_obj_id, $a_has_write = 
false)
 
   24                $this->
setId(
"bdgbdg");
 
   25                $this->has_write = (bool)$a_has_write;
 
   28                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   32                $this->
setTitle($lng->txt(
"obj_bdga"));
 
   39                $this->
addColumn($lng->txt(
"title"), 
"title");
 
   40                $this->
addColumn($lng->txt(
"type"), 
"type");
 
   41                $this->
addColumn($lng->txt(
"active"), 
"active");
 
   45                        $this->
addColumn($lng->txt(
"action"), 
"");              
 
   47                        $lng->loadLanguageModule(
"content");
 
   48                        $this->
addMultiCommand(
"copyBadges", $lng->txt(
"cont_copy_to_clipboard"));              
 
   72                $this->filter[
"title"] = 
$title->getValue();
 
   75                $valid_types = $handler->getAvailableTypesForObjType($this->parent_type);
 
   77                        sizeof($valid_types) > 1)
 
   79                        $lng->loadLanguageModule(
"search");
 
   82                        foreach($valid_types as $id => $type)
 
   90                        $this->filter[
"type"] = $type->getValue();                                      
 
   98                include_once 
"Services/Badge/classes/class.ilBadgeRenderer.php";
 
  103                                "id" => $badge->getId(),
 
  104                                "title" => $badge->getTitle(),  
 
  105                                "active" => $badge->isActive(),
 
  106                                "type" => ($this->parent_type != 
"bdga")
 
  108                                        : $badge->getTypeInstance()->getCaption(),
 
  109                                "manual" => (!$badge->getTypeInstance() instanceof 
ilBadgeAuto),
 
  123                        $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
 
  126                $this->tpl->setVariable(
"PREVIEW", $a_set[
"renderer"]->
getHTML());      
 
  127                $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);  
 
  128                $this->tpl->setVariable(
"TXT_TYPE", $a_set[
"type"]);    
 
  129                $this->tpl->setVariable(
"TXT_ACTIVE", $a_set[
"active"]
 
  135                        include_once 
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
 
  137                        $actions->setListTitle(
$lng->txt(
"actions"));
 
  139                        if($a_set[
"manual"] && 
 
  147                                $actions->addItem(
$lng->txt(
"badge_award_badge"), 
"", 
$url);
 
  153                        $actions->addItem(
$lng->txt(
"edit"), 
"", 
$url);
 
  155                        $this->tpl->setVariable(
"ACTIONS", $actions->getHTML());        
 
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
static getInstance()
Constructor.
TableGUI class for badge listing.
__construct($a_parent_obj, $a_parent_cmd="", $a_parent_obj_id, $a_has_write=false)
fillRow($a_set)
Standard Version of Fill Row.
getItems($a_parent_obj_id)
static getInstancesByParentId($a_parent_id, array $a_filter=null)
static getExtendedTypeCaption(ilBadgeType $a_type)
static _lookupType($a_id, $a_reference=false)
lookup object type
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