4include_once(
"Services/Block/classes/class.ilBlockGUI.php");
 
   30                parent::__construct();
 
   32                $this->parent_ref_id = (int)
$_GET[
"ref_id"];
 
   36                $lng->loadLanguageModule(
"classification");
 
   37                $this->
setTitle($lng->txt(
"clsfct_block_title"));
 
   56                $next_class = 
$ilCtrl->getNextClass($this);
 
   62                                if(
$ilCtrl->isAsynch() && 
$cmd != 
"getAjax" && 
$cmd != 
"filterContainer")
 
   85                        case "filterContainer":
 
  106                $tpl->addJavaScript(
"Services/Classification/js/ilClassification.js");
 
  108                return parent::getHTML();               
 
  118                echo 
$tpl->getOnLoadCodeForAsynch();
 
  133                $this->tpl->setVariable(
"BLOCK_ROW", 
"");
 
  135                $ajax_block_id = 
"block_".$this->getBlockType().
"_0";
 
  136                $ajax_block_url = 
$ilCtrl->getLinkTarget($this, 
"getAjax", 
"", 
true, 
false);
 
  137                $ajax_content_id = 
"il_center_col";
 
  138                $ajax_content_url = 
$ilCtrl->getLinkTarget($this, 
"filterContainer", 
"", 
true, 
false);
 
  141                $tpl->addOnLoadCode(
'il.Classification.setAjax("'.$ajax_block_id.
'", "'.
 
  142                        $ajax_block_url.
'", "'.$ajax_content_id.
'", "'.$ajax_content_url.
'");');
 
  146                        $btpl = 
new ilTemplate(
"tpl.classification_block.html", 
true, 
true, 
"Services/Classification");
 
  148                        foreach(
$html as $item)
 
  150                                $btpl->setCurrentBlock(
"provider_chunk_bl");
 
  151                                $btpl->setVariable(
"TITLE", $item[
"title"]);
 
  152                                $btpl->setVariable(
"CHUNK", $item[
"html"]);
 
  153                                $btpl->parseCurrentBlock();
 
  156                        $this->tpl->setVariable(
"DATA", $btpl->get());
 
  167                global $objDefinition, 
$lng, $tree, $ilAccess, 
$ilCtrl;
 
  177                $all_matching_provider_object_ids = 
null;
 
  186                                $provider_object_ids = 
$provider->getFilteredObjects();
 
  187                                if(is_array($all_matching_provider_object_ids))
 
  189                                        $all_matching_provider_object_ids = array_intersect($matching_provider_object_ids, $provider_object_ids);
 
  193                                        $all_matching_provider_object_ids = $provider_object_ids;
 
  198                $has_content = 
false;
 
  200                $ltpl = 
new ilTemplate(
"tpl.classification_object_list.html", 
true, 
true, 
"Services/Classification");
 
  202                if(
sizeof($all_matching_provider_object_ids))
 
  205                                "object_reference.ref_id" 
  206                                ,
"object_data.obj_id"  
  209                                ,
"object_data.description" 
  211                        $matching = $tree->getSubTreeFilteredByObjIds($this->parent_ref_id, $all_matching_provider_object_ids, $fields);
 
  212                        if(
sizeof($matching))
 
  214                                $valid_objects = array();                               
 
  217                                include_once 
"Services/Object/classes/class.ilObjectListGUIPreloader.php";
 
  220                                foreach($matching as $item)
 
  222                                        if($item[
"ref_id"] != $this->parent_ref_id && 
 
  223                                                !$tree->isDeleted($item[
"ref_id"]) &&
 
  224                                                $ilAccess->checkAccess(
"read", 
"", $item[
"ref_id"]))
 
  226                                                $valid_objects[] = $item;
 
  228                                                $preloader->addItem($item[
"obj_id"], $item[
"type"], $item[
"ref_id"]);                                   
 
  232                                if(
sizeof($valid_objects))
 
  236                                        $preloader->preload();
 
  240                                        $this->item_list_gui = array();
 
  241                                        foreach($valid_objects as $obj)
 
  243                                                $type = $obj[
"type"];
 
  246                                                if (empty($this->item_list_gui[$type]))
 
  248                                                        $class = $objDefinition->getClassName($type);
 
  249                                                        $location = $objDefinition->getLocation($type);
 
  251                                                        $full_class = 
"ilObj".$class.
"ListGUI";
 
  253                                                        include_once(
$location.
"/class.".$full_class.
".php");
 
  254                                                        $this->item_list_gui[$type] = 
new $full_class();
 
  255                                                        $this->item_list_gui[$type]->enableDelete(
false);
 
  256                                                        $this->item_list_gui[$type]->enablePath(
true, $this->parent_ref_id); 
 
  257                                                        $this->item_list_gui[$type]->enableCut(
false);
 
  258                                                        $this->item_list_gui[$type]->enableCopy(
false);
 
  259                                                        $this->item_list_gui[$type]->enableSubscribe(
false);
 
  260                                                        $this->item_list_gui[$type]->enableLink(
false);
 
  261                                                        $this->item_list_gui[$type]->enableIcon(
true);
 
  266                                                                $provider->initListGUI($this->item_list_gui[$type]);
 
  270                                                $html = $this->item_list_gui[$type]->getListItemHTML(
 
  274                                                        $obj[
"description"]);
 
  278                                                        $css = ($css != 
"tblrow1") ? 
"tblrow1" : 
"tblrow2";
 
  280                                                        $ltpl->setCurrentBlock(
"res_row");
 
  281                                                        $ltpl->setVariable(
"ROWCLASS", $css);
 
  282                                                        $ltpl->setVariable(
"RESOURCE_HTML", 
$html);
 
  283                                                        $ltpl->setVariable(
"ALT_TYPE", 
$lng->txt(
"obj_".$type));
 
  284                                                        $ltpl->setVariable(
"IMG_TYPE",
 
  286                                                        $ltpl->parseCurrentBlock();
 
  293                include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
 
  295                $content_block->setTitle(
$lng->txt(
"clsfct_content_title"));            
 
  296                $content_block->addHeaderCommand(
$ilCtrl->getParentReturn($this), 
"", 
true);
 
  300                        $content_block->setContent($ltpl->get());
 
  304                        $content_block->setContent(
$lng->txt(
"clsfct_content_no_match"));
 
  307                echo $content_block->getHTML();
 
  313                if(!isset(self::$providers_cache[$this->parent_ref_id]))
 
  315                        include_once 
"Services/Classification/classes/class.ilClassificationProvider.php";
 
  317                                        $this->parent_ref_id,
 
  318                                        $this->parent_obj_id,
 
  319                                        $this->parent_obj_typ                   
 
  324                if($a_check_post && (
bool)!$_REQUEST[
"rdrw"])
 
  336                                        unset(
$_SESSION[self::getBlockType()][$id]);
 
An exception for terminatinating execution or to throw for unit testing.
This class represents a block method of a block.
setFooterInfo($a_footerinfo, $a_hide_and_icon=false)
Set Footer Info.
setTitle($a_title)
Set Title.
Classification block, displayed in different contexts, e.g.
static getScreenMode()
Get Screen Mode for current command.
__construct()
Constructor.
getHTML()
Handle config status.
fillDataSection()
Standard implementation for row based data.
initProviders($a_check_post=false)
static isRepositoryObject()
static getValidProviders($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type)
Get all valid providers (for parent container)
Preloader for object list GUIs.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
BlockGUI class for (centered) Content on Personal Desktop.
special template class to simplify handling of ITX/PEAR
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)