/**
  * Get node icon
  * Return custom icon of OrgUnit type if existing
  *
  * @param array $a_node
  *
  * @return string
  */
 public function getNodeIcon($a_node)
 {
     global $ilias;
     if ($ilias->getSetting('custom_icons')) {
         $icons_cache = ilObjOrgUnit::getIconsCache();
         $obj_id = ilObject::_lookupObjId($a_node["child"]);
         if (isset($icons_cache[$obj_id])) {
             return $icons_cache[$obj_id];
         }
     }
     return ilObject::_getIcon($obj_id, "tiny", $a_node["type"]);
 }
 public function insertIconsAndCheckboxes()
 {
     global $lng, $ilias;
     // FSX removed $this->getCheckboxStatus() in if-Statement: 0014726
     if (!$ilias->getSetting('custom_icons')) {
         parent::insertIconsAndCheckboxes();
         return;
     }
     $icons_cache = ilObjOrgUnit::getIconsCache();
     if (isset($icons_cache[$this->obj_id])) {
         $icon_file = $icons_cache[$this->obj_id];
         // icon link
         if (!$this->default_command or !$this->getCommandsStatus() and !$this->restrict_to_goto) {
         } else {
             $this->tpl->setCurrentBlock("icon_link_s");
             if ($this->default_command["frame"] != "") {
                 $this->tpl->setVariable("ICON_TAR", "target='" . $this->default_command["frame"] . "'");
             }
             $this->tpl->setVariable("ICON_HREF", $this->default_command["link"]);
             $this->tpl->parseCurrentBlock();
             $this->tpl->touchBlock("icon_link_e");
         }
         $this->enableIcon(false);
         if ($this->getContainerObject()->isActiveAdministrationPanel() && !$_SESSION['clipboard']) {
             $this->tpl->touchBlock("i_1");
             // indent main div  }
             $this->tpl->touchBlock("d_2");
             // indent main div  } #0014913
         } else {
             $this->tpl->touchBlock("d_1");
         }
         parent::insertIconsAndCheckboxes();
         $this->tpl->setCurrentBlock("icon");
         $this->tpl->setVariable("ALT_ICON", $lng->txt("icon") . " " . $lng->txt("obj_" . $this->getIconImageType()));
         $this->tpl->setVariable("SRC_ICON", $icon_file);
         $this->tpl->parseCurrentBlock();
         $this->enableIcon(true);
     } else {
         parent::insertIconsAndCheckboxes();
     }
 }
Esempio n. 3
0
 /**
  * called by prepare output
  */
 public function setTitleAndDescription()
 {
     # all possible create permissions
     //$possible_ops_ids = $rbacreview->getOperationsByTypeAndClass('orgu', 'create');
     parent::setTitleAndDescription();
     if ($this->object->getTitle() == "__OrgUnitAdministration") {
         $this->tpl->setTitle($this->lng->txt("objs_orgu"));
         $this->tpl->setDescription($this->lng->txt("objs_orgu"));
     }
     // Check for custom icon of type
     if ($this->ilias->getSetting('custom_icons')) {
         $icons_cache = ilObjOrgUnit::getIconsCache();
         $icon_file = isset($icons_cache[$this->object->getId()]) ? $icons_cache[$this->object->getId()] : '';
         if ($icon_file) {
             $this->tpl->setTitleIcon($icon_file, $this->lng->txt("obj_" . $this->object->getType()));
         }
     }
 }