4include_once(
"Services/Table/classes/class.ilTable2GUI.php");
 
    5include_once(
"./Services/Badge/classes/class.ilBadge.php");
 
   25    public function __construct($a_parent_obj, $a_parent_cmd = 
"", $a_parent_obj_id, $a_has_write = 
false)
 
   29        $this->ctrl = 
$DIC->ctrl();
 
   30        $this->lng = 
$DIC->language();
 
   34        $this->
setId(
"bdgbdg");
 
   35        $this->has_write = (bool) $a_has_write;
 
   38        parent::__construct($a_parent_obj, $a_parent_cmd);
 
   44        if ($this->has_write) {
 
   52        if ($this->has_write) {
 
   55            $lng->loadLanguageModule(
"content");
 
   80        $this->filter[
"title"] = 
$title->getValue();
 
   83        $valid_types = 
$handler->getAvailableTypesForObjType($this->parent_type);
 
   85            sizeof($valid_types) > 1) {
 
   86            $lng->loadLanguageModule(
"search");
 
   89            foreach ($valid_types as 
$id => 
$type) {
 
   96            $this->filter[
"type"] = 
$type->getValue();
 
  104        include_once 
"Services/Badge/classes/class.ilBadgeRenderer.php";
 
  108                "id" => $badge->getId(),
 
  109                "title" => $badge->getTitle(),
 
  110                "active" => $badge->isActive(),
 
  111                "type" => ($this->parent_type != 
"bdga")
 
  113                    : $badge->getTypeInstance()->getCaption(),
 
  114                "manual" => (!$badge->getTypeInstance() instanceof 
ilBadgeAuto),
 
  127        if ($this->has_write) {
 
  128            $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
 
  131        $this->tpl->setVariable(
"PREVIEW", $a_set[
"renderer"]->
getHTML());
 
  132        $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
 
  133        $this->tpl->setVariable(
"TXT_TYPE", $a_set[
"type"]);
 
  134        $this->tpl->setVariable(
"TXT_ACTIVE", $a_set[
"active"]
 
  138        if ($this->has_write) {
 
  139            include_once 
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
 
  141            $actions->setListTitle(
$lng->txt(
"actions"));
 
  143            if ($a_set[
"manual"] &&
 
  150                $actions->addItem(
$lng->txt(
"badge_award_badge"), 
"", 
$url);
 
  156            $actions->addItem(
$lng->txt(
"edit"), 
"", 
$url);
 
  158            $this->tpl->setVariable(
"ACTIONS", $actions->getHTML());
 
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
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
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.
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.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
if(!array_key_exists('StateId', $_REQUEST)) $id