4include_once(
"Services/Table/classes/class.ilTable2GUI.php");
 
    5include_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();
 
   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();
 
  110        $data = $filter_types = array();
 
  114        include_once 
"Services/Badge/classes/class.ilBadgeRenderer.php";
 
  115        include_once 
"Services/Link/classes/class.ilLink.php";
 
  119            $container_url = 
null;
 
  121                    ilObject::_getIcon($badge_item[
"parent_id"], 
"big", $badge_item[
"parent_type"]) .
 
  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);
 
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)
ilTable2GUI constructor.
fillRow($a_set)
Standard Version of Fill Row.
static _getAllReferences($a_id)
get all reference ids of object
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
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.
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