Public Member Functions | Static Public Member Functions | Static Public Attributes

ilPDSelectedItemsBlockGUI Class Reference

BlockGUI class for Selected Items on Personal Desktop. More...

Inheritance diagram for ilPDSelectedItemsBlockGUI:
Collaboration diagram for ilPDSelectedItemsBlockGUI:

Public Member Functions

 ilPDSelectedItemsBlockGUI ()
 Constructor.
 getHTML ()
 Get HTML.
executeCommand ()
 execute command
 getContent ()
 setContent ($a_content)
 fillDataSection ()
 Fill data section.
 fillFooter ()
 block footer
 setFooterLinks ()
 Set footer links.
 getSelectedItemsBlockHTML ()
 get selected item block
 getSelectedItemsPerType (&$tpl)
 get selected items per type
 getSelectedItemsPerLocation (&$tpl)
 get selected items per type
 resetRowType ()
newBlockTemplate ()
 returns a new list block template
getItemListGUI ($a_type)
 get item list gui class for type
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template
 addParentRow (&$a_tpl, $a_ref_id, $a_show_image=true)
 adds a header row to a block template
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="", $a_related_header="")
 adds a standard row to a block template
 getIntroduction ()
 Get overview.
 orderPDItemsByLocation ()
 order desktop items by location
 orderPDItemsByType ()
 order desktop items by Type

Static Public Member Functions

static getBlockType ()
 Get block type.
static isRepositoryObject ()
 Get block type.

Static Public Attributes

static $block_type = "pditems"

Detailed Description

BlockGUI class for Selected Items on Personal Desktop.

Author:
Alex Killing <alex.killing@gmx.de>
Version:
$Id$

ilPDSelectedItemsBlockGUI: ilColumnGUI

Definition at line 34 of file class.ilPDSelectedItemsBlockGUI.php.


Member Function Documentation

ilPDSelectedItemsBlockGUI::addHeaderRow ( &$  a_tpl,
a_type,
a_show_image = true 
)

adds a header row to a block template

Parameters:
object $a_tpl block template
string $a_type object type private

Definition at line 531 of file class.ilPDSelectedItemsBlockGUI.php.

References $title, and ilUtil::getImagePath().

Referenced by getSelectedItemsPerType().

        {
                if (!is_array($a_type))
                {
                        $icon = ilUtil::getImagePath("icon_".$a_type.".gif");
                        $title = $this->lng->txt("objs_".$a_type);
                        $header_id = "th_".$a_type;
                }
                else
                {
                        $icon = ilUtil::getImagePath("icon_lm.gif");
                        $title = $this->lng->txt("learning_resources");
                        $header_id = "th_lres";
                }
                if ($a_show_image)
                {
                        $a_tpl->setCurrentBlock("container_header_row_image");
                        $a_tpl->setVariable("HEADER_IMG", $icon);
                        $a_tpl->setVariable("HEADER_ALT", $title);
                }
                else
                {
                        $a_tpl->setCurrentBlock("container_header_row");
                }
                
                $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
                $a_tpl->setVariable("BLOCK_HEADER_ID", $header_id);
                $a_tpl->parseCurrentBlock();
                $a_tpl->touchBlock("container_row");
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::addParentRow ( &$  a_tpl,
a_ref_id,
a_show_image = true 
)

adds a header row to a block template

Parameters:
object $a_tpl block template
string $a_type object type private

Definition at line 569 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilSetting, $title, ilContainer::_lookupIconPath(), ilObject::_lookupObjId(), ilObject::_lookupTitle(), ilObject::_lookupType(), ilUtil::getImagePath(), and getItemListGUI().

Referenced by getSelectedItemsPerLocation().

        {
                global $tree, $ilSetting;
                
                $par_id = ilObject::_lookupObjId($a_ref_id);
                $type = ilObject::_lookupType($par_id);
                if (!in_array($type, array("lm", "dbk", "sahs", "htlm")))
                {
                        $icon = ilUtil::getImagePath("icon_".$type.".gif");
                }
                else
                {
                        $icon = ilUtil::getImagePath("icon_lm.gif");
                }
                
                // custom icon
                if ($ilSetting->get("custom_icons") &&
                in_array($type, array("cat","grp","crs", "root")))
                {
                        require_once("classes/class.ilContainer.php");
                        if (($path = ilContainer::_lookupIconPath($par_id, "small")) != "")
                        {
                                $icon = $path;
                        }
                }
                
                if ($tree->getRootId() != $par_id)
                {
                        $title = ilObject::_lookupTitle($par_id);
                }
                else
                {
                        $nd = $tree->getNodeData(ROOT_FOLDER_ID);
                        $title = $nd["title"];
                        if ($title == "ILIAS")
                        {
                                $title = $this->lng->txt("repository");
                        }
                }
                
                $item_list_gui =& $this->getItemListGUI($type);
                
                $item_list_gui->enableDelete(false);
                $item_list_gui->enableCut(false);
                $item_list_gui->enablePayment(false);
                $item_list_gui->enableLink(false);
                $item_list_gui->enableDescription(false);
                $item_list_gui->enableProperties(false);
                $item_list_gui->enablePreconditions(false);
                $item_list_gui->enablePath(true);
                $item_list_gui->enableCommands(false);
                $html = $item_list_gui->getListItemHTML($a_ref_id,
                $par_id, $title, "");
                
                if ($a_show_image)
                {
                        $a_tpl->setCurrentBlock("container_header_row_image");
                        $a_tpl->setVariable("HEADER_IMG", $icon);
                        $a_tpl->setVariable("HEADER_ALT", $title);
                }
                else
                {
                        $a_tpl->setCurrentBlock("container_header_row");
                }
                
                $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $html);
                $a_tpl->setVariable("BLOCK_HEADER_ID", "th_".$a_ref_id);
                $a_tpl->parseCurrentBlock();
                $a_tpl->touchBlock("container_row");
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::addStandardRow ( &$  a_tpl,
a_html,
a_item_ref_id = "",
a_item_obj_id = "",
a_image_type = "",
a_related_header = "" 
)

adds a standard row to a block template

Parameters:
object $a_tpl block template
string $a_html html code private

Definition at line 647 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilSetting, $title, ilContainer::_lookupIconPath(), and ilUtil::getImagePath().

Referenced by getSelectedItemsPerLocation(), and getSelectedItemsPerType().

        {
                global $ilSetting;
                
                $this->cur_row_type = ($this->cur_row_type == "row_type_1")
                ? "row_type_2"
                : "row_type_1";
                $a_tpl->touchBlock($this->cur_row_type);
                
                if ($a_image_type != "")
                {
                        if (!is_array($a_image_type) && !in_array($a_image_type, array("lm", "dbk", "htlm", "sahs")))
                        {
                                $icon = ilUtil::getImagePath("icon_".$a_image_type.".gif");
                                $title = $this->lng->txt("obj_".$a_image_type);
                        }
                        else
                        {
                                $icon = ilUtil::getImagePath("icon_lm.gif");
                                $title = $this->lng->txt("learning_resource");
                        }
                        
                        // custom icon
                        if ($ilSetting->get("custom_icons") &&
                        in_array($a_image_type, array("cat","grp","crs")))
                        {
                                require_once("classes/class.ilContainer.php");
                                if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "")
                                {
                                        $icon = $path;
                                }
                        }
                        
                        $a_tpl->setCurrentBlock("block_row_image");
                        $a_tpl->setVariable("ROW_IMG", $icon);
                        $a_tpl->setVariable("ROW_ALT", $title);
                        $a_tpl->parseCurrentBlock();
                }
                else
                {
                        $a_tpl->setVariable("ROW_NBSP", "&nbsp;");
                }
                $a_tpl->setCurrentBlock("container_standard_row");
                $a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
                $rel_headers = ($a_related_header != "")
                ? "th_selected_items ".$a_related_header
                : "th_selected_items";
                $a_tpl->setVariable("BLOCK_ROW_HEADERS", $rel_headers);
                $a_tpl->parseCurrentBlock();
                $a_tpl->touchBlock("container_row");
        }

Here is the call graph for this function:

Here is the caller graph for this function:

& ilPDSelectedItemsBlockGUI::executeCommand (  ) 

execute command

Definition at line 99 of file class.ilPDSelectedItemsBlockGUI.php.

References $cmd, and $ilCtrl.

        {
                global $ilCtrl;

                $next_class = $ilCtrl->getNextClass();
                $cmd = $ilCtrl->getCmd("getHTML");

                return $this->$cmd();
        }

ilPDSelectedItemsBlockGUI::fillDataSection (  ) 

Fill data section.

Reimplemented from ilBlockGUI.

Definition at line 122 of file class.ilPDSelectedItemsBlockGUI.php.

References getContent(), getIntroduction(), and ilBlockGUI::setDataSection().

        {
                global $ilUser;
                
                if ($this->getContent() != "")
                {
                        $this->tpl->setVariable("BLOCK_ROW", $this->getContent());
                }
                else
                {
                        $this->setDataSection($this->getIntroduction());
                }
        }

Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::fillFooter (  ) 

block footer

Reimplemented from ilBlockGUI.

Definition at line 140 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $lng, ilBlockGUI::fillFooterLinks(), ilBlockGUI::getColSpan(), and setFooterLinks().

        {
                global $ilCtrl, $lng, $ilUser;

                $this->setFooterLinks();
                $this->fillFooterLinks();
                $this->tpl->setVariable("FCOLSPAN", $this->getColSpan());
                if ($this->tpl->blockExists("block_footer"))
                {
                        $this->tpl->setCurrentBlock("block_footer");
                        $this->tpl->parseCurrentBlock();
                }
        }

Here is the call graph for this function:

static ilPDSelectedItemsBlockGUI::getBlockType (  )  [static]

Get block type.

Returns:
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 63 of file class.ilPDSelectedItemsBlockGUI.php.

        {
                return self::$block_type;
        }

ilPDSelectedItemsBlockGUI::getContent (  ) 

Definition at line 109 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by fillDataSection(), getHTML(), and setFooterLinks().

        {
                return $this->content;
        }

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getHTML (  ) 

Get HTML.

Reimplemented from ilBlockGUI.

Definition at line 79 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, getContent(), getSelectedItemsBlockHTML(), setContent(), ilBlockGUI::setData(), and ilBlockGUI::setEnableDetailRow().

Referenced by orderPDItemsByLocation(), and orderPDItemsByType().

        {
                global $ilCtrl;
                
                // workaround to show details row
                $this->setData(array("dummy"));
                
                $this->setContent($this->getSelectedItemsBlockHTML());
                if ($this->getContent() == "")
                {
                        $this->setEnableDetailRow(false);
                }
                $ilCtrl->clearParametersByClass("ilpersonaldesktopgui");
                $ilCtrl->clearParameters($this);
                return parent::getHTML();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getIntroduction (  ) 

Get overview.

Definition at line 703 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $lng, $title, $tpl, and ilUtil::getImagePath().

Referenced by fillDataSection().

        {
                global $ilUser, $lng, $ilCtrl, $tree;
                
                // get repository link
                $nd = $tree->getNodeData(ROOT_FOLDER_ID);
                $title = $nd["title"];
                if ($title == "ILIAS")
                {
                        $title = $lng->txt("repository");
                }
                
                $tpl = new ilTemplate("tpl.pd_intro.html", true, true, "Services/PersonalDesktop");
                $tpl->setVariable("IMG_PD_LARGE", ilUtil::getImagePath("icon_pd_xxl.gif"));
                $tpl->setVariable("TXT_WELCOME", $lng->txt("pdesk_intro"));
                $tpl->setVariable("TXT_INTRO_1", sprintf($lng->txt("pdesk_intro2"), $lng->txt("to_desktop")));
                $tpl->setVariable("TXT_INTRO_2", sprintf($lng->txt("pdesk_intro3"),
                        '<a href="repository.php?cmd=frameset&getlast=true">'.$title.'</a>'));
                $tpl->setVariable("TXT_INTRO_3", $lng->txt("pdesk_intro4"));
                
                return $tpl->get();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

& ilPDSelectedItemsBlockGUI::getItemListGUI ( a_type  ) 

get item list gui class for type

Definition at line 503 of file class.ilPDSelectedItemsBlockGUI.php.

References $location.

Referenced by addParentRow(), and getSelectedItemsPerLocation().

        {
                global $objDefinition;
                //echo "<br>+$a_type+";
                if (!is_object($this->item_list_guis[$a_type]))
                {
                        $class = $objDefinition->getClassName($a_type);
                        $location = $objDefinition->getLocation($a_type);
                        $full_class = "ilObj".$class."ListGUI";
                        //echo "<br>-".$location."/class.".$full_class.".php"."-";
                        include_once($location."/class.".$full_class.".php");
                        $item_list_gui = new $full_class();
                        $this->item_list_guis[$a_type] =& $item_list_gui;
                }
                else
                {
                        $item_list_gui =& $this->item_list_guis[$a_type];
                }
                return $item_list_gui;
        }

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getSelectedItemsBlockHTML (  ) 

get selected item block

Definition at line 203 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ok, $tpl, getSelectedItemsPerLocation(), getSelectedItemsPerType(), and newBlockTemplate().

Referenced by getHTML().

        {
                global $ilUser, $rbacsystem, $objDefinition, $ilBench;
                
                $tpl =& $this->newBlockTemplate();
                
                switch ($ilUser->getPref("pd_order_items"))
                {
                        case "location":
                        $ok = $this->getSelectedItemsPerLocation($tpl);
                        break;
                        
                        default:
                        $ok = $this->getSelectedItemsPerType($tpl);
                        break;
                }
                
                return $tpl->get();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getSelectedItemsPerLocation ( &$  tpl  ) 

get selected items per type

Definition at line 382 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ilSetting, $tpl, addParentRow(), addStandardRow(), ilBlockGUI::getCurrentDetailLevel(), getItemListGUI(), and resetRowType().

Referenced by getSelectedItemsBlockHTML().

        {
                global $ilUser, $rbacsystem, $objDefinition, $ilBench, $ilSetting, $ilObjDataCache;
                
                $output = false;
                
                $items = $ilUser->getDesktopItems();
                $item_html = array();
                
                if (count($items) > 0)
                {
                        // preload object data cache
                        $ref_ids = array();
                        foreach($items as $item)
                        {
                                $ref_ids[] = $item["ref_id"];
                        }
                        reset($items);
                        $ilObjDataCache->preloadReferenceCache($ref_ids);
                        
                        foreach($items as $item)
                        {
                                //echo "1";
                                // get list gui class for each object type
                                if ($cur_obj_type != $item["type"])
                                {
                                        $item_list_gui =& $this->getItemListGUI($item["type"]);
                                        
                                        $item_list_gui->enableDelete(false);
                                        $item_list_gui->enableCut(false);
                                        $item_list_gui->enablePayment(false);
                                        $item_list_gui->enableLink(false);
                                        $item_list_gui->enableInfoScreen(false);
                                        if ($this->getCurrentDetailLevel() < 3)
                                        {
                                                //echo "3";
                                                $item_list_gui->enableDescription(false);
                                                $item_list_gui->enableProperties(false);
                                                $item_list_gui->enablePreconditions(false);
                                        }
                                        if ($this->getCurrentDetailLevel() < 2)
                                        {
                                                $item_list_gui->enableCommands(true, true);
                                        }
                                }
                                // render item row
                                $ilBench->start("ilPersonalDesktopGUI", "getListHTML");
                                
                                $html = $item_list_gui->getListItemHTML($item["ref_id"],
                                $item["obj_id"], $item["title"], $item["description"]);
                                $ilBench->stop("ilPersonalDesktopGUI", "getListHTML");
                                if ($html != "")
                                {
                                        $item_html[] = array("html" => $html, "item_ref_id" => $item["ref_id"],
                                        "item_obj_id" => $item["obj_id"], "parent_ref" => $item["parent_ref"],
                                        "type" => $item["type"]);
                                }
                        }
                        
                        // output block for resource type
                        if (count($item_html) > 0)
                        {
                                $cur_parent_ref = 0;
                                
                                // content row
                                foreach($item_html as $item)
                                {
                                        // add a parent header row for each new parent
                                        if ($cur_parent_ref != $item["parent_ref"])
                                        {
                                                if ($ilSetting->get("icon_position_in_lists") == "item_rows")
                                                {
                                                        $this->addParentRow($tpl, $item["parent_ref"], false);
                                                }
                                                else
                                                {
                                                        $this->addParentRow($tpl, $item["parent_ref"]);
                                                }
                                                $this->resetRowType();
                                                $cur_parent_ref = $item["parent_ref"];
                                        }
                                        
                                        //if ($ilUser->getPref("pd_selected_items_details") != "y" ||
                                        //      $this->ilias->getSetting("icon_position_in_lists") == "item_rows")
                                        //{
                                                $this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"], $item["type"],
                                                "th_".$cur_parent_ref);
                                        //}
                                        //else
                                        //{
                                                //      $this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"]);
                                        //}
                                        $output = true;
                                }
                        }
                }
                
                return $output;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getSelectedItemsPerType ( &$  tpl  ) 

get selected items per type

Definition at line 226 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ilSetting, $location, $title, $tpl, addHeaderRow(), addStandardRow(), ilBlockGUI::getCurrentDetailLevel(), and resetRowType().

Referenced by getSelectedItemsBlockHTML().

        {
                global $ilUser, $rbacsystem, $objDefinition, $ilBench, $ilSetting, $ilObjDataCache;
                
                $items = $ilUser->getDesktopItems();
                if (count($items) > 0)
                {
                        // preload object data cache
                        $ref_ids = array();
                        foreach($items as $item)
                        {
                                $ref_ids[] = $item["ref_id"];
                        }
                        $ilObjDataCache->preloadReferenceCache($ref_ids);
                }
                
                $output = false;
                $types = array(
                array("title" => $this->lng->txt("objs_cat"), "types" => "cat"),
                array("title" => $this->lng->txt("objs_fold"), "types" => "fold"),
                array("title" => $this->lng->txt("objs_crs"), "types" => "crs"),
                array("title" => $this->lng->txt("objs_grp"), "types" => "grp"),
                array("title" => $this->lng->txt("objs_chat"), "types" => "chat"),
                array("title" => $this->lng->txt("objs_frm"), "types" => "frm"),
                array("title" => $this->lng->txt("learning_resources"),"types" => array("lm", "htlm", "sahs", "dbk")),
                array("title" => $this->lng->txt("objs_glo"), "types" => "glo"),
                array("title" => $this->lng->txt("objs_file"), "types" => "file"),
                array("title" => $this->lng->txt("objs_webr"), "types" => "webr"),
                array("title" => $this->lng->txt("objs_mcst"), "types" => "mcst"),
                array("title" => $this->lng->txt("objs_exc"), "types" => "exc"),
                array("title" => $this->lng->txt("objs_tst"), "types" => "tst"),
                array("title" => $this->lng->txt("objs_svy"), "types" => "svy"),
                array("title" => $this->lng->txt("objs_mep"), "types" => "mep"),
                array("title" => $this->lng->txt("objs_qpl"), "types" => "qpl"),
                array("title" => $this->lng->txt("objs_spl"), "types" => "spl"),
                array("title" => $this->lng->txt("objs_icrs"), "types" => "icrs"),
                array("title" => $this->lng->txt("objs_icla"), "types" => "icla")
                );
                
                foreach ($types as $type)
                {
                        $type = $type["types"];
                        $title = $type["title"];
                        
                        $items = $ilUser->getDesktopItems($type);
//var_dump($items);
                        $item_html = array();
                        
                        if ($this->getCurrentDetailLevel() == 3)
                        {
                                $rel_header = (is_array($type))
                                ? "th_lres"
                                : "th_".$type;
                        }
                        
                        if (count($items) > 0)
                        {
                                $tstCount = 0;
                                $unsetCount = 0;
                                $progressCount = 0;
                                $unsetFlag = 0;
                                $progressFlag = 0;
                                $completedFlag = 0;
                                if (strcmp($a_type, "tst") == 0) {
                                        $items = $this->multiarray_sort($items, "used_tries; title");
                                        foreach ($items as $tst_item) {
                                                if (!isset($tst_item["used_tries"])) {
                                                        $unsetCount++;
                                                }
                                                elseif ($tst_item["used_tries"] == 0) {
                                                        $progressCount++;
                                                }
                                        }
                                }
                                
                                foreach($items as $item)
                                {
                                        // get list gui class for each object type
                                        if ($cur_obj_type != $item["type"])
                                        {
                                                $class = $objDefinition->getClassName($item["type"]);
                                                $location = $objDefinition->getLocation($item["type"]);
                                                $full_class = "ilObj".$class."ListGUI";
                                                include_once($location."/class.".$full_class.".php");
                                                $item_list_gui = new $full_class();
                                                $item_list_gui->enableDelete(false);
                                                $item_list_gui->enableCut(false);
                                                $item_list_gui->enablePayment(false);
                                                $item_list_gui->enableLink(false);
                                                $item_list_gui->enableInfoScreen(false);
                                                if ($this->getCurrentDetailLevel() < 3)
                                                {
                                                        $item_list_gui->enableDescription(false);
                                                        $item_list_gui->enableProperties(false);
                                                        $item_list_gui->enablePreconditions(false);
                                                        $item_list_gui->enableNoticeProperties(false);
                                                }
                                                if ($this->getCurrentDetailLevel() < 2)
                                                {
                                                        $item_list_gui->enableCommands(true, true);
                                                }
                                        }
                                        // render item row
                                        $ilBench->start("ilPersonalDesktopGUI", "getListHTML");
                                        
                                        $html = $item_list_gui->getListItemHTML($item["ref_id"],
                                        $item["obj_id"], $item["title"], $item["description"]);
                                        $ilBench->stop("ilPersonalDesktopGUI", "getListHTML");
                                        if ($html != "")
                                        {
                                                $item_html[] = array("html" => $html, "item_ref_id" => $item["ref_id"],
                                                "item_obj_id" => $item["obj_id"]);
                                        }
                                }
                                
                                // output block for resource type
                                if (count($item_html) > 0)
                                {
                                        // add a header for each resource type
                                        if ($this->getCurrentDetailLevel() == 3)
                                        {
                                                if ($ilSetting->get("icon_position_in_lists") == "item_rows")
                                                {
                                                        $this->addHeaderRow($tpl, $type, false);
                                                }
                                                else
                                                {
                                                        $this->addHeaderRow($tpl, $type);
                                                }
                                                $this->resetRowType();
                                        }
                                        
                                        // content row
                                        foreach($item_html as $item)
                                        {
                                                if ($this->getCurrentDetailLevel() < 3 ||
                                                $ilSetting->get("icon_position_in_lists") == "item_rows")
                                                {
                                                        $this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"], $type, $rel_header);
                                                }
                                                else
                                                {
                                                        $this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"], "", $rel_header);
                                                }
                                                $output = true;
                                        }
                                }
                        }
                }
                
                return $output;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::ilPDSelectedItemsBlockGUI (  ) 

Constructor.

Definition at line 41 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $lng, ilBlockGUI::ilBlockGUI(), ilBlockGUI::setAvailableDetailLevels(), ilBlockGUI::setBigMode(), ilBlockGUI::setColSpan(), ilBlockGUI::setEnableNumInfo(), ilBlockGUI::setLimit(), and ilBlockGUI::setTitle().

        {
                global $ilCtrl, $lng, $ilUser;
                
                parent::ilBlockGUI();
                
                //$this->setImage(ilUtil::getImagePath("icon_bm_s.gif"));
                $this->setTitle($lng->txt("selected_items"));
                $this->setEnableNumInfo(false);
                $this->setLimit(99999);
                $this->setColSpan(2);
                $this->setAvailableDetailLevels(3, 1);
                $this->setBigMode(true);
                $this->lng = $lng;
                $this->allow_moving = false;
        }

Here is the call graph for this function:

static ilPDSelectedItemsBlockGUI::isRepositoryObject (  )  [static]

Get block type.

Returns:
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 73 of file class.ilPDSelectedItemsBlockGUI.php.

        {
                return false;
        }

& ilPDSelectedItemsBlockGUI::newBlockTemplate (  ) 

returns a new list block template

private

Returns:
object block template

Definition at line 493 of file class.ilPDSelectedItemsBlockGUI.php.

References $tpl.

Referenced by getSelectedItemsBlockHTML().

        {
                $tpl = new ilTemplate ("tpl.pd_list_block.html", true, true);
                $this->cur_row_type = "";
                return $tpl;
        }

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::orderPDItemsByLocation (  ) 

order desktop items by location

Definition at line 729 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, exit, and getHTML().

        {
                global $ilUser, $ilCtrl;
                
                $ilUser->writePref("pd_order_items", "location");
                
                if ($ilCtrl->isAsynch())
                {
                        echo $this->getHTML();
                        exit;
                }
                else
                {
                        $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
                }
        }

Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::orderPDItemsByType (  ) 

order desktop items by Type

Definition at line 749 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, exit, and getHTML().

        {
                global $ilUser, $ilCtrl;
                
                $ilUser->writePref("pd_order_items", "type");
                
                if ($ilCtrl->isAsynch())
                {
                        echo $this->getHTML();
                        exit;
                }
                else
                {
                        $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
                }
        }

Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::resetRowType (  ) 

Definition at line 482 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by getSelectedItemsPerLocation(), and getSelectedItemsPerType().

        {
                $this->cur_row_type = "";
        }

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::setContent ( a_content  ) 

Definition at line 114 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by getHTML().

        {
                $this->content = $a_content;
        }

Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::setFooterLinks (  ) 

Set footer links.

Definition at line 157 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $lng, ilBlockGUI::addFooterLink(), getContent(), and ilBlockGUI::setEnableNumInfo().

Referenced by fillFooter().

        {
                global $ilUser, $ilCtrl, $lng;
                
                if ($this->getContent() == "")
                {
                        $this->setEnableNumInfo(false);
                        return "";
                }
                
                // by type
                if ($ilUser->getPref("pd_order_items") == 'location')
                {
                        $this->addFooterLink( $lng->txt("by_type"),
                                $ilCtrl->getLinkTarget($this,
                                "orderPDItemsByType"),
                                $ilCtrl->getLinkTarget($this,
                                "orderPDItemsByType", "", true),
                                "block_".$this->getBlockType()."_".$this->block_id
                                );
                }
                else
                {
                        $this->addFooterLink($lng->txt("by_type"));
                }

                // by location
                if ($ilUser->getPref("pd_order_items") == 'location')
                {
                        $this->addFooterLink($lng->txt("by_location"));
                }
                else
                {
                        $this->addFooterLink( $lng->txt("by_location"),
                                $ilCtrl->getLinkTarget($this,
                                "orderPDItemsByLocation"),
                                $ilCtrl->getLinkTarget($this,
                                "orderPDItemsByLocation", "", true),
                                "block_".$this->getBlockType()."_".$this->block_id
                                );
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

ilPDSelectedItemsBlockGUI::$block_type = "pditems" [static]

Definition at line 36 of file class.ilPDSelectedItemsBlockGUI.php.


The documentation for this class was generated from the following file: