ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjectListGUI Class Reference

Class ilObjectListGUI. More...

+ Inheritance diagram for ilObjectListGUI:
+ Collaboration diagram for ilObjectListGUI:

Public Member Functions

 ilObjectListGUI ()
 constructor More...
 
 setContainerObject ($container_obj)
 set the container object (e.g categorygui) Used for link, delete ... More...
 
 getContainerObject ()
 get container object More...
 
 init ()
 initialisation More...
 
 enableProperties ($a_status)
 En/disable properties. More...
 
 getPropertiesStatus ()
 
 enablePreconditions ($a_status)
 En/disable preconditions. More...
 
 getNoticePropertiesStatus ()
 
 enableNoticeProperties ($a_status)
 En/disable notices. More...
 
 getPreconditionsStatus ()
 
 enableDescription ($a_status)
 En/disable description. More...
 
 getDescriptionStatus ()
 
 getSearchFragmentStatus ()
 Show hide search result fragments. More...
 
 enableSearchFragments ($a_status)
 En/disable description. More...
 
 enableLinkedPath ($a_status)
 Enable linked path. More...
 
 enabledRelevance ()
 enabled relevance More...
 
 enableRelevance ($a_status)
 enable relevance More...
 
 setRelevance ($a_rel)
 set relevance More...
 
 getRelevance ()
 get relevance More...
 
 enableIcon ($a_status)
 En/Dis-able icons. More...
 
 getIconStatus ()
 Are icons enabled? More...
 
 enableCheckbox ($a_status)
 En/Dis-able checkboxes. More...
 
 getCheckboxStatus ()
 Are checkboxes enabled? More...
 
 enableExpand ($a_status)
 En/Dis-able expand/collapse link. More...
 
 getExpandStatus ()
 Is expand/collapse enabled. More...
 
 setExpanded ($a_status)
 
 isExpanded ()
 
 setPositionInputField ($a_field_index, $a_position_value)
 Set position input field. More...
 
 enableDelete ($a_status)
 En/disable delete. More...
 
 getDeleteStatus ()
 
 enableCut ($a_status)
 En/disable cut. More...
 
 getCutStatus ()
 
 enableCopy ($a_status)
 En/disable copy. More...
 
 getCopyStatus ()
 
 enableSubscribe ($a_status)
 En/disable subscribe. More...
 
 getSubscribeStatus ()
 
 enablePayment ($a_status)
 En/disable payment. More...
 
 getPaymentStatus ()
 
 enableLink ($a_status)
 En/disable link. More...
 
 getLinkStatus ()
 
 enablePath ($a_path)
 En/disable path. More...
 
 getPathStatus ()
 
 enableCommands ($a_status, $a_std_only=false)
 En/disable commands. More...
 
 getCommandsStatus ()
 
 enableInfoScreen ($a_info_screen)
 En/disable path. More...
 
 addSubItemHTML ($a_html)
 Add HTML for subitem (used for sessions) More...
 
 getInfoScreenStatus ()
 
 enableProgressInfo ($a_status)
 enable progress info More...
 
 getProgressInfoStatus ()
 get progress info status More...
 
 enableSubstitutions ($a_status)
 Enable substitutions. More...
 
 getSubstitutionStatus ()
 Get substitution status. More...
 
 enableItemDetailLinks ($a_status)
 enable item detail links E.g Direct links to chapters or pages More...
 
 getItemDetailLinkStatus ()
 get item detail link status More...
 
 setItemDetailLinks ($a_detail_links, $a_intro_txt='')
 set items detail links More...
 
 insertItemDetailLinks ()
 insert item detail links More...
 
 setTitle ($a_title)
 
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php More...
 
 setDescription ($a_description)
 
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php More...
 
 setSearchFragment ($a_text)
 set search fragment More...
 
 getSearchFragment ()
 get search fragment More...
 
 setSeparateCommands ($a_val)
 Set separate commands. More...
 
 getSeparateCommands ()
 Get separate commands. More...
 
 getCommandId ()
 get command id Normally the ref id. More...
 
 setAdditionalInformation ($a_val)
 Set additional information. More...
 
 getAdditionalInformation ()
 Get additional information. More...
 
 setDetailsLevel ($a_level)
 Details level Currently used in Search which shows only limited properties of forums Currently used for Sessions (switch between minimal and extended view for each session) More...
 
 getDetailsLevel ()
 Get current details level. More...
 
 enableRepositoryTransfer ($a_value)
 Enable copy/move to repository (from personal workspace) More...
 
 restrictToGoto ($a_value)
 Restrict all actions/links to goto. More...
 
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
 
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="", $a_context=self::CONTEXT_REPOSITORY)
 inititialize new item (is called by getItemHTML()) More...
 
 createDefaultCommand ($command)
 Get default command link Overwritten for e.g categories,courses => they return a goto link If search engine visibility is enabled these object type return a goto_CLIENT_ID_cat_99.html link. More...
 
 getCommandLink ($a_cmd)
 Get command link url. More...
 
 getCommandFrame ($a_cmd)
 Get command target frame. More...
 
 getCommandImage ($a_cmd)
 Get command icon image. More...
 
 getProperties ($a_item='')
 Get item properties. More...
 
 addCustomProperty ($a_property="", $a_value="", $a_alert=false, $a_newline=false)
 add custom property More...
 
 getCustomProperties ($a_prop)
 get custom properties More...
 
 getAlertProperties ()
 get all alert properties More...
 
 getNoticeProperties ()
 get notice properties More...
 
 addCustomCommand ($a_link, $a_lang_var, $a_frame="", $onclick="")
 add a custom command More...
 
 forceVisibleOnly ($a_stat)
 Force visible access only. More...
 
 isVisibleOnlyForced ()
 Force unreadable. More...
 
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user) More...
 
 getIconImageType ()
 Returns the icon image type. More...
 
 insertTitle ()
 insert item title More...
 
 insertSubstitutions ()
 Insert substitutions. More...
 
 insertDescription ()
 insert item description More...
 
 insertSearchFragment ()
 Insert highlighted search fragment. More...
 
 insertRelevance ()
 insert relevance More...
 
 setMode ($a_mode)
 set output mode More...
 
 getMode ()
 get output mode More...
 
 setConditionDepth ($a_depth)
 set depth for precondition output (stops at level 5) More...
 
 isMode ($a_mode)
 check current output mode More...
 
 insertProperties ($a_item='')
 insert properties More...
 
 insertNoticeProperties ()
 
 insertPayment ()
 insert payment information More...
 
 insertPreconditions ()
 insert all missing preconditions More...
 
 insertCommand ($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
 insert command button More...
 
 insertDeleteCommand ()
 insert cut command More...
 
 insertLinkCommand ()
 insert link command More...
 
 insertCutCommand ($a_to_repository=false)
 insert cut command More...
 
 insertCopyCommand ($a_to_repository=false)
 Insert copy command. More...
 
 insertPasteCommand ()
 Insert paste command. More...
 
 insertSubscribeCommand ()
 insert subscribe command More...
 
 insertInfoScreenCommand ()
 insert info screen command More...
 
 insertCommonSocialCommands ($a_header_actions=false)
 Insert common social commands (comments, notes, tagging) More...
 
 insertTimingsCommand ()
 insert edit timings command More...
 
 insertCommands ($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
 insert all commands into html code More...
 
 enableComments ($a_value, $a_enable_comments_settings=true)
 Toogle comments action status. More...
 
 enableNotes ($a_value)
 Toogle notes action status. More...
 
 enableTags ($a_value)
 Toogle tags action status. More...
 
 enableRating ($a_value, $a_text=null, $a_categories=false, array $a_ctrl_path=null)
 Toogle rating action status. More...
 
 enableMultiDownload ($a_value)
 Toggles whether multiple objects can be downloaded at once or not. More...
 
 insertMultiDownloadCommand ()
 
 enableDownloadCheckbox ($a_ref_id, $a_value)
 
 getDownloadCheckboxState ()
 
 setHeaderSubObject ($a_type, $a_id)
 Set sub object identifier. More...
 
 addHeaderIcon ($a_id, $a_img, $a_tooltip=null, $a_onclick=null, $a_status_text=null, $a_href=null)
 
 addHeaderIconHTML ($a_id, $a_html)
 
 setAjaxHash ($a_hash)
 
 getHeaderAction ()
 Get header action. More...
 
 appendRepositoryFrameParameter ($a_link)
 workaround: all links into the repository (from outside) must tell repository to setup the frameset More...
 
 modifySAHSlaunch ($a_link, $wtarget)
 workaround: SAHS in new javavasript-created window or iframe More...
 
 insertPath ()
 insert path More...
 
 insertProgressInfo ()
 insert progress info More...
 
 insertIconsAndCheckboxes ()
 Insert icons and checkboxes. More...
 
 insertSubItems ()
 Insert subitems. More...
 
 insertPositionField ()
 Insert field for positioning. More...
 
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output More...
 
 storeAccessCache ()
 Store access cache. More...
 
 getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_context=self::CONTEXT_REPOSITORY)
 Get all item information (title, commands, description) in HTML. More...
 
 setParentRefId ($a_ref_id)
 Set current parent ref id to enable unique js-ids (sessions, etc.) More...
 
 getCommandsHTML ()
 Get commands HTML (must be called after get list item html) More...
 
 isSideBlock ()
 Returns whether current item is a block in a side column or not. More...
 
 setBoldTitle ($a_bold_title)
 public boolean $a_bold_title set the item title bold More...
 
 isTitleBold ()
 public More...
 
 enableTimings ($a_status)
 enable timings link More...
 
 isFileUploadAllowed ()
 Gets a value indicating whether file uploads to this object are allowed or not. More...
 
 insertFileUpload ()
 Inserts a file upload component. More...
 

Static Public Member Functions

static prepareJsLinks ($a_redraw_url, $a_notes_url, $a_tags_url, $a_tpl=null)
 Insert js/ajax links into template. More...
 
static preloadCommonProperties ($a_obj_ids, $a_context)
 Preload common properties. More...
 

Data Fields

const DETAILS_MINIMAL = 10
 
const DETAILS_SEARCH = 20
 
const DETAILS_ALL = 30
 
const CONTEXT_REPOSITORY = 1
 
const CONTEXT_WORKSPACE = 2
 
const CONTEXT_SHOP = 3
 
const CONTEXT_WORKSPACE_SHARING = 4
 
const CONTEXT_PERSONAL_DESKTOP = 5
 
const CONTEXT_SEARCH = 6
 
const DOWNLOAD_CHECKBOX_NONE = 0
 
const DOWNLOAD_CHECKBOX_ENABLED = 1
 
const DOWNLOAD_CHECKBOX_DISABLED = 2
 
 $ctrl
 
 $description_enabled = true
 
 $preconditions_enabled = true
 
 $properties_enabled = true
 
 $notice_properties_enabled = true
 
 $commands_enabled = true
 
 $cust_prop = array()
 
 $cust_commands = array()
 
 $info_screen_enabled = false
 
 $condition_depth = 0
 
 $std_cmd_only = false
 
 $sub_item_html = array()
 
 $multi_download_enabled = false
 
 $download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE
 

Protected Member Functions

 buildGotoLink ()
 
 insertPaymentCommand ($has_extension_prices=false)
 
 parseConditions ($toggle_id, $conditions, $obligatory=true)
 
 getUniqueItemId ($a_as_div=false)
 Get unique item identifier (for js-actions) More...
 
 isCommentsActivated ($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access=true)
 Check comments status against comments settings and context. More...
 

Protected Attributes

 $obj_id
 
 $ref_id
 
 $type
 
 $sub_obj_id
 
 $sub_obj_type
 
 $substitutions = null
 
 $substitutions_enabled = false
 
 $icons_enabled = false
 
 $checkboxes_enabled = false
 
 $position_enabled = false
 
 $progress_enabled = false
 
 $item_detail_links_enabled = false
 
 $item_detail_links = array()
 
 $item_detail_links_intro = ''
 
 $search_fragments_enabled = false
 
 $search_fragment = ''
 
 $path_linked = false
 
 $enabled_relevance = false
 
 $relevance = 0
 
 $expand_enabled = false
 
 $is_expanded = true
 
 $bold_title = false
 
 $copy_enabled = true
 
 $details_level = self::DETAILS_ALL
 
 $reference_ref_id = false
 
 $separate_commands = false
 
 $search_fragment_enabled = false
 
 $additional_information = false
 
 $static_link_enabled = false
 
 $repository_transfer_enabled = false
 
 $shared = false
 
 $restrict_to_goto = false
 
 $comments_enabled = false
 
 $comments_settings_enabled = false
 
 $notes_enabled = false
 
 $tags_enabled = false
 
 $rating_enabled = false
 
 $rating_categories_enabled = false
 
 $rating_text = false
 
 $rating_ctrl_path = false
 
 $timings_enabled = true
 
 $force_visible_only = false
 
 $prevent_duplicate_commands = array()
 
 $parent_ref_id
 

Static Protected Attributes

static $cnt_notes = array()
 
static $cnt_tags = array()
 
static $comments_activation = array()
 
static $preload_done = false
 

Detailed Description

Class ilObjectListGUI.

Important note:

All access checking should be made within $ilAccess and the checkAccess of the ilObj...Access classes. Do not additionally enable or disable any commands within this GUI class or in derived classes, except when the container (e.g. a search result list) generally refuses them.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e $Id$

Definition at line 23 of file class.ilObjectListGUI.php.

Member Function Documentation

◆ addCustomCommand()

ilObjectListGUI::addCustomCommand (   $a_link,
  $a_lang_var,
  $a_frame = "",
  $onclick = "" 
)

add a custom command

Definition at line 1323 of file class.ilObjectListGUI.php.

1324  {
1325  $this->cust_commands[] =
1326  array("link" => $a_link, "lang_var" => $a_lang_var,
1327  "frame" => $a_frame, "onclick" => $onclick);
1328  }

◆ addCustomProperty()

ilObjectListGUI::addCustomProperty (   $a_property = "",
  $a_value = "",
  $a_alert = false,
  $a_newline = false 
)

◆ addHeaderIcon()

ilObjectListGUI::addHeaderIcon (   $a_id,
  $a_img,
  $a_tooltip = null,
  $a_onclick = null,
  $a_status_text = null,
  $a_href = null 
)
Parameters
string$a_id
string$a_img
string$a_tooltip
string$a_onclick
string$a_status_text
string$a_href

Definition at line 3008 of file class.ilObjectListGUI.php.

Referenced by getHeaderAction().

3009  {
3010  $this->header_icons[$a_id] = array("img" => $a_img,
3011  "tooltip" => $a_tooltip,
3012  "onclick" => $a_onclick,
3013  "status_text" => $a_status_text,
3014  "href" => $a_href);
3015  }
+ Here is the caller graph for this function:

◆ addHeaderIconHTML()

ilObjectListGUI::addHeaderIconHTML (   $a_id,
  $a_html 
)
Parameters
string$a_id
string$a_html

Definition at line 3022 of file class.ilObjectListGUI.php.

Referenced by getHeaderAction().

3023  {
3024  $this->header_icons[$a_id] = $a_html;
3025  }
+ Here is the caller graph for this function:

◆ addSubItemHTML()

ilObjectListGUI::addSubItemHTML (   $a_html)

Add HTML for subitem (used for sessions)

Parameters
string$a_htmlsubitems HTML

Definition at line 628 of file class.ilObjectListGUI.php.

629  {
630  $this->sub_item_html[] = $a_html;
631  }

◆ adminCommandsIncluded()

ilObjectListGUI::adminCommandsIncluded ( )

returns whether any admin commands (link, delete, cut) are included in the output

Definition at line 3397 of file class.ilObjectListGUI.php.

3398  {
3399  return $this->adm_commands_included;
3400  }

◆ appendRepositoryFrameParameter()

ilObjectListGUI::appendRepositoryFrameParameter (   $a_link)

workaround: all links into the repository (from outside) must tell repository to setup the frameset

Definition at line 3191 of file class.ilObjectListGUI.php.

References $_GET, and ilUtil\appendUrlParameterString().

Referenced by insertCommands(), and insertTitle().

3192  {
3193  $script = substr(strrchr($_SERVER["PHP_SELF"],"/"),1);
3194 
3195  // we should get rid of this nonsense with 4.4 (alex)
3196  if ((strtolower($_GET["baseClass"]) != "ilrepositorygui") &&
3197  is_int(strpos($a_link,"baseClass=ilRepositoryGUI")))
3198  {
3199  if ($this->type != "frm")
3200  {
3201  $a_link =
3202  ilUtil::appendUrlParameterString($a_link, "rep_frame=1");
3203  }
3204  }
3205 
3206  return $a_link;
3207  }
$_GET["client_id"]
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildGotoLink()

ilObjectListGUI::buildGotoLink ( )
protected

Definition at line 1555 of file class.ilObjectListGUI.php.

References ilWorkspaceAccessHandler\getGotoLink().

Referenced by insertTitle().

1556  {
1557  switch($this->context)
1558  {
1559  case self::CONTEXT_WORKSPACE_SHARING:
1560  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
1561  return ilWorkspaceAccessHandler::getGotoLink($this->ref_id, $this->obj_id);
1562 
1563  default:
1564  // not implemented yet
1565  break;
1566  }
1567  }
static getGotoLink($a_node_id, $a_obj_id, $a_additional=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkCommandAccess()

ilObjectListGUI::checkCommandAccess (   $a_permission,
  $a_cmd,
  $a_ref_id,
  $a_type,
  $a_obj_id = "" 
)
Parameters

Definition at line 918 of file class.ilObjectListGUI.php.

References isVisibleOnlyForced().

Referenced by getCommands(), getListItemHTML(), insertCopyCommand(), insertCutCommand(), insertDeleteCommand(), insertLinkCommand(), insertSubscribeCommand(), insertTimingsCommand(), and isCommentsActivated().

919  {
920  global $ilAccess;
921 
922  // e.g: subitems should not be readable since their parent sesssion is readonly.
923  if($a_permission != 'visible' and $this->isVisibleOnlyForced())
924  {
925  return false;
926  }
927 
928  $cache_prefix = null;
929  if($this->context == self::CONTEXT_WORKSPACE || $this->context == self::CONTEXT_WORKSPACE_SHARING)
930  {
931  $cache_prefix = "wsp";
932  if(!$this->ws_access)
933  {
934  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
935  $this->ws_access = new ilWorkspaceAccessHandler();
936  }
937  }
938 
939  if (isset($this->access_cache[$a_permission]["-".$a_cmd][$cache_prefix.$a_ref_id]))
940  {
941  return $this->access_cache[$a_permission]["-".$a_cmd][$cache_prefix.$a_ref_id];
942  }
943 
944  if($this->context == self::CONTEXT_REPOSITORY || $this->context == self::CONTEXT_SHOP)
945  {
946  $access = $ilAccess->checkAccess($a_permission,$a_cmd,$a_ref_id,$a_type,$a_obj_id);
947  if ($ilAccess->getPreventCachingLastResult())
948  {
949  $this->prevent_access_caching = true;
950  }
951  }
952  else
953  {
954  $access = $this->ws_access->checkAccess($a_permission,$a_cmd,$a_ref_id,$a_type);
955  }
956 
957  $this->access_cache[$a_permission]["-".$a_cmd][$cache_prefix.$a_ref_id] = $access;
958  return $access;
959  }
Access handler for personal workspace.
isVisibleOnlyForced()
Force unreadable.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createDefaultCommand()

ilObjectListGUI::createDefaultCommand (   $command)

Get default command link Overwritten for e.g categories,courses => they return a goto link If search engine visibility is enabled these object type return a goto_CLIENT_ID_cat_99.html link.

public

Parameters
intcommand link

Definition at line 1000 of file class.ilObjectListGUI.php.

References ilLink\_getStaticLink().

Referenced by insertCommands(), and insertPaymentCommand().

1001  {
1002  if($this->static_link_enabled)
1003  {
1004  include_once('./Services/Link/classes/class.ilLink.php');
1005  if($link = ilLink::_getStaticLink($this->ref_id,$this->type,false))
1006  {
1007  $command['link'] = $link;
1008  $command['frame'] = '_top';
1009  }
1010  }
1011  return $command;
1012  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableCheckbox()

ilObjectListGUI::enableCheckbox (   $a_status)

En/Dis-able checkboxes.

Parameters
booleancheckbox on/off

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

383  {
384  $this->checkboxes_enabled = $a_status;
385  }

◆ enableCommands()

ilObjectListGUI::enableCommands (   $a_status,
  $a_std_only = false 
)

En/disable commands.

Parameters
bool
Returns
void

Definition at line 597 of file class.ilObjectListGUI.php.

598  {
599  $this->commands_enabled = $a_status;
600  $this->std_cmd_only = $a_std_only;
601  }

◆ enableComments()

ilObjectListGUI::enableComments (   $a_value,
  $a_enable_comments_settings = true 
)

Toogle comments action status.

Parameters
boolean$a_value

Definition at line 2821 of file class.ilObjectListGUI.php.

References $ilSetting.

Referenced by ilObjectListGUI().

2822  {
2823  global $ilSetting;
2824 
2825  // global switch
2826  if($ilSetting->get("disable_comments"))
2827  {
2828  $a_value = false;
2829  }
2830 
2831  $this->comments_enabled = (bool)$a_value;
2832  $this->comments_settings_enabled = (bool)$a_enable_comments_settings;
2833  }
global $ilSetting
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ enableCopy()

ilObjectListGUI::enableCopy (   $a_status)

En/disable copy.

Parameters
bool
Returns
void

Definition at line 490 of file class.ilObjectListGUI.php.

491  {
492  $this->copy_enabled = $a_status;
493 
494  return;
495  }

◆ enableCut()

ilObjectListGUI::enableCut (   $a_status)

En/disable cut.

Parameters
bool
Returns
void

Definition at line 468 of file class.ilObjectListGUI.php.

469  {
470  $this->cut_enabled = $a_status;
471 
472  return;
473  }

◆ enableDelete()

ilObjectListGUI::enableDelete (   $a_status)

En/disable delete.

Parameters
bool
Returns
void

Definition at line 445 of file class.ilObjectListGUI.php.

446  {
447  $this->delete_enabled = $a_status;
448 
449  return;
450  }

◆ enableDescription()

ilObjectListGUI::enableDescription (   $a_status)

En/disable description.

Parameters
bool
Returns
void

Definition at line 268 of file class.ilObjectListGUI.php.

269  {
270  $this->description_enabled = $a_status;
271 
272  return;
273  }

◆ enableDownloadCheckbox()

ilObjectListGUI::enableDownloadCheckbox (   $a_ref_id,
  $a_value 
)

Definition at line 2928 of file class.ilObjectListGUI.php.

References $_SESSION, and getContainerObject().

2929  {
2930  global $ilAccess;
2931 
2932  // TODO: delegate to list object class!
2933  if (!$this->getContainerObject()->isActiveAdministrationPanel() || $_SESSION["clipboard"])
2934  {
2935  if (in_array($this->type, array("file", "fold")) &&
2936  $ilAccess->checkAccess("read", "", $a_ref_id, $this->type))
2937  {
2938  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_ENABLED;
2939  }
2940  else
2941  {
2942  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_DISABLED;
2943  }
2944  }
2945  else
2946  {
2947  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE;
2948  }
2949  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
getContainerObject()
get container object
+ Here is the call graph for this function:

◆ enabledRelevance()

ilObjectListGUI::enabledRelevance ( )

enabled relevance

Returns

Definition at line 323 of file class.ilObjectListGUI.php.

References $enabled_relevance.

Referenced by getListItemHTML(), and insertRelevance().

324  {
326  }
+ Here is the caller graph for this function:

◆ enableExpand()

ilObjectListGUI::enableExpand (   $a_status)

En/Dis-able expand/collapse link.

Parameters
booleancheckbox on/off

Definition at line 402 of file class.ilObjectListGUI.php.

403  {
404  $this->expand_enabled = $a_status;
405  }

◆ enableIcon()

ilObjectListGUI::enableIcon (   $a_status)

En/Dis-able icons.

Parameters
booleanicons on/off

Definition at line 362 of file class.ilObjectListGUI.php.

363  {
364  $this->icons_enabled = $a_status;
365  }

◆ enableInfoScreen()

ilObjectListGUI::enableInfoScreen (   $a_info_screen)

En/disable path.

Parameters
bool
Returns
void

Definition at line 618 of file class.ilObjectListGUI.php.

619  {
620  $this->info_screen_enabled = $a_info_screen;
621  }

◆ enableItemDetailLinks()

ilObjectListGUI::enableItemDetailLinks (   $a_status)

enable item detail links E.g Direct links to chapters or pages

public

Parameters
bool
Returns

Definition at line 698 of file class.ilObjectListGUI.php.

699  {
700  $this->item_detail_links_enabled = $a_status;
701  }

◆ enableLink()

ilObjectListGUI::enableLink (   $a_status)

En/disable link.

Parameters
bool
Returns
void

Definition at line 554 of file class.ilObjectListGUI.php.

555  {
556  $this->link_enabled = $a_status;
557 
558  return;
559  }

◆ enableLinkedPath()

ilObjectListGUI::enableLinkedPath (   $a_status)

Enable linked path.

Parameters
bool
Returns

Definition at line 314 of file class.ilObjectListGUI.php.

315  {
316  $this->path_linked = $a_status;
317  }

◆ enableMultiDownload()

ilObjectListGUI::enableMultiDownload (   $a_value)

Toggles whether multiple objects can be downloaded at once or not.

Parameters
boolean$a_valuetrue, to allow downloading of multiple objects; otherwise, false.

Definition at line 2893 of file class.ilObjectListGUI.php.

2894  {
2895  $folder_set = new ilSetting("fold");
2896  if (!$folder_set->get("enable_multi_download"))
2897  {
2898  $a_value = false;
2899  }
2900  $this->multi_download_enabled = (bool)$a_value;
2901  }
ILIAS Setting Class.

◆ enableNotes()

ilObjectListGUI::enableNotes (   $a_value)

Toogle notes action status.

Parameters
boolean$a_value

Definition at line 2840 of file class.ilObjectListGUI.php.

References $ilSetting.

Referenced by ilObjectListGUI().

2841  {
2842  global $ilSetting;
2843 
2844  // global switch
2845  if($ilSetting->get("disable_notes"))
2846  {
2847  $a_value = false;
2848  }
2849 
2850  $this->notes_enabled = (bool)$a_value;
2851  }
global $ilSetting
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ enableNoticeProperties()

ilObjectListGUI::enableNoticeProperties (   $a_status)

En/disable notices.

Parameters
bool
Returns
void

Definition at line 246 of file class.ilObjectListGUI.php.

247  {
248  $this->notice_properties_enabled = $a_status;
249 
250  return;
251  }

◆ enablePath()

ilObjectListGUI::enablePath (   $a_path)

En/disable path.

Parameters
bool
Returns
void

Definition at line 576 of file class.ilObjectListGUI.php.

577  {
578  $this->path_enabled = $a_path;
579  }

◆ enablePayment()

ilObjectListGUI::enablePayment (   $a_status)

En/disable payment.

Parameters
bool
Returns
void

Definition at line 533 of file class.ilObjectListGUI.php.

534  {
535  $this->payment_enabled = $a_status;
536 
537  return;
538  }

◆ enablePreconditions()

ilObjectListGUI::enablePreconditions (   $a_status)

En/disable preconditions.

Parameters
bool
Returns
void

Definition at line 228 of file class.ilObjectListGUI.php.

229  {
230  $this->preconditions_enabled = $a_status;
231 
232  return;
233  }

◆ enableProgressInfo()

ilObjectListGUI::enableProgressInfo (   $a_status)

enable progress info

public

Parameters

Definition at line 650 of file class.ilObjectListGUI.php.

651  {
652  $this->progress_enabled = $a_status;
653  }

◆ enableProperties()

ilObjectListGUI::enableProperties (   $a_status)

En/disable properties.

Parameters
bool
Returns
void

Definition at line 206 of file class.ilObjectListGUI.php.

Referenced by insertCommands().

207  {
208  $this->properties_enabled = $a_status;
209 
210  return;
211  }
+ Here is the caller graph for this function:

◆ enableRating()

ilObjectListGUI::enableRating (   $a_value,
  $a_text = null,
  $a_categories = false,
array  $a_ctrl_path = null 
)

Toogle rating action status.

Parameters
boolean$a_value
string$a_text
boolean$a_categories
array$a_ctrl_path

Definition at line 2876 of file class.ilObjectListGUI.php.

2877  {
2878  $this->rating_enabled = (bool)$a_value;
2879 
2880  if($this->rating_enabled)
2881  {
2882  $this->rating_categories_enabled = (bool)$a_categories;
2883  $this->rating_text = $a_text;
2884  $this->rating_ctrl_path = $a_ctrl_path;
2885  }
2886  }

◆ enableRelevance()

ilObjectListGUI::enableRelevance (   $a_status)

enable relevance

Returns

Definition at line 332 of file class.ilObjectListGUI.php.

333  {
334  $this->enabled_relevance = $a_status;
335  }

◆ enableRepositoryTransfer()

ilObjectListGUI::enableRepositoryTransfer (   $a_value)

Enable copy/move to repository (from personal workspace)

Parameters
bool$a_value

Definition at line 898 of file class.ilObjectListGUI.php.

899  {
900  $this->repository_transfer_enabled = (bool)$a_value;
901  }

◆ enableSearchFragments()

ilObjectListGUI::enableSearchFragments (   $a_status)

En/disable description.

Parameters
bool
Returns
void

Definition at line 302 of file class.ilObjectListGUI.php.

303  {
304  $this->search_fragment_enabled = $a_status;
305 
306  return;
307  }

◆ enableSubscribe()

ilObjectListGUI::enableSubscribe (   $a_status)

En/disable subscribe.

Parameters
bool
Returns
void

Definition at line 512 of file class.ilObjectListGUI.php.

513  {
514  $this->subscribe_enabled = $a_status;
515 
516  return;
517  }

◆ enableSubstitutions()

ilObjectListGUI::enableSubstitutions (   $a_status)

Enable substitutions.

public

Parameters

Definition at line 674 of file class.ilObjectListGUI.php.

675  {
676  $this->substitutions_enabled = $a_status;
677  }

◆ enableTags()

ilObjectListGUI::enableTags (   $a_value)

Toogle tags action status.

Parameters
boolean$a_value

Definition at line 2858 of file class.ilObjectListGUI.php.

Referenced by ilObjectListGUI().

2859  {
2860  $tags_set = new ilSetting("tags");
2861  if (!$tags_set->get("enable"))
2862  {
2863  $a_value = false;
2864  }
2865  $this->tags_enabled = (bool)$a_value;
2866  }
ILIAS Setting Class.
+ Here is the caller graph for this function:

◆ enableTimings()

ilObjectListGUI::enableTimings (   $a_status)

enable timings link

public

Parameters
bool
Returns

Definition at line 3771 of file class.ilObjectListGUI.php.

3772  {
3773  $this->timings_enabled = (bool)$a_status;
3774  }

◆ forceVisibleOnly()

ilObjectListGUI::forceVisibleOnly (   $a_stat)

Force visible access only.

Parameters
type$a_stat

Definition at line 1334 of file class.ilObjectListGUI.php.

1335  {
1336  $this->force_visible_only = $a_stat;
1337  }

◆ getAdditionalInformation()

ilObjectListGUI::getAdditionalInformation ( )

Get additional information.

Returns
string additional information

Definition at line 867 of file class.ilObjectListGUI.php.

References $additional_information.

Referenced by getListItemHTML().

868  {
870  }
+ Here is the caller graph for this function:

◆ getAlertProperties()

ilObjectListGUI::getAlertProperties ( )

get all alert properties

Returns
array

Definition at line 1292 of file class.ilObjectListGUI.php.

References getProperties().

1293  {
1294  $alert = array();
1295  foreach((array)$this->getProperties() as $prop)
1296  {
1297  if($prop['alert'] == true)
1298  {
1299  $alert[] = $prop;
1300  }
1301  }
1302  return $alert;
1303  }
getProperties($a_item='')
Get item properties.
+ Here is the call graph for this function:

◆ getCheckboxStatus()

ilObjectListGUI::getCheckboxStatus ( )

Are checkboxes enabled?

Returns
boolean icons enabled?

Definition at line 392 of file class.ilObjectListGUI.php.

References $checkboxes_enabled.

Referenced by insertIconsAndCheckboxes().

393  {
395  }
+ Here is the caller graph for this function:

◆ getCommandFrame()

ilObjectListGUI::getCommandFrame (   $a_cmd)

Get command target frame.

Overwrite this method if link frame is not current frame

Parameters
string$a_cmdcommand
Returns
string command target frame

Definition at line 1076 of file class.ilObjectListGUI.php.

References ilDAVActivationChecker\_isActive().

Referenced by getCommands(), insertCommonSocialCommands(), ilObjOrgUnitListGUI\insertInfoScreenCommand(), and insertInfoScreenCommand().

1077  {
1078  // BEGIN WebDAV Get mount webfolder link.
1079  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1080  if ($a_cmd == 'mount_webfolder' && ilDAVActivationChecker::_isActive())
1081  {
1082  return '_blank';
1083  }
1084  // begin-patch fm
1085  if($a_cmd == 'fileManagerLaunch')
1086  {
1087  return '_blank';
1088  }
1089  // end-patch fm
1090  return "";
1091  }
static _isActive()
Static getter.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCommandId()

ilObjectListGUI::getCommandId ( )

get command id Normally the ref id.

Overwritten for course and category references

public

Parameters

Definition at line 847 of file class.ilObjectListGUI.php.

References $ref_id.

Referenced by getCommandLink(), insertCopyCommand(), insertCutCommand(), insertDeleteCommand(), insertIconsAndCheckboxes(), insertLinkCommand(), insertPasteCommand(), and insertSubscribeCommand().

848  {
849  return $this->ref_id;
850  }
+ Here is the caller graph for this function:

◆ getCommandImage()

ilObjectListGUI::getCommandImage (   $a_cmd)

Get command icon image.

Overwrite this method if an icon is provided

Parameters
string$a_cmdcommand
Returns
string image path

Definition at line 1102 of file class.ilObjectListGUI.php.

Referenced by getCommands().

1103  {
1104  return "";
1105  }
+ Here is the caller graph for this function:

◆ getCommandLink()

ilObjectListGUI::getCommandLink (   $a_cmd)

Get command link url.

Overwrite this method, if link target is not build by ctrl class (e.g. "forum.php"). This is the case for all links now, but bringing everything to ilCtrl should be realised in the future.

Parameters
string$a_cmdcommand
Returns
string command link url

Definition at line 1027 of file class.ilObjectListGUI.php.

References $_GET, ilDAVActivationChecker\_isActive(), getCommandId(), and ilDAVServer\getInstance().

Referenced by getCommands(), insertCommonSocialCommands(), and insertInfoScreenCommand().

1028  {
1029  if($this->context == self::CONTEXT_REPOSITORY || $this->context == self::CONTEXT_SHOP)
1030  {
1031  // BEGIN WebDAV Get mount webfolder link.
1032  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1033  if ($a_cmd == 'mount_webfolder' && ilDAVActivationChecker::_isActive())
1034  {
1035  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
1036  $davServer = ilDAVServer::getInstance();
1037 
1038  // XXX: The following is a very dirty, ugly trick.
1039  // To mount URI needs to be put into two attributes:
1040  // href and folder. This hack returns both attributes
1041  // like this: http://...mount_uri..." folder="http://...folder_uri...
1042  return $davServer->getMountURI($this->ref_id).
1043  '" folder="'.$davServer->getFolderURI($this->ref_id);
1044  }
1045  // END WebDAV Get mount webfolder link.
1046 
1047  $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->getCommandId());
1048  $cmd_link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
1049  $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
1050  return $cmd_link;
1051 
1052  /* separate method for this line
1053  $cmd_link = $this->ctrl->getLinkTargetByClass($this->gui_class_name,
1054  $a_cmd);
1055  return $cmd_link;
1056  */
1057  }
1058  else
1059  {
1060  $this->ctrl->setParameterByClass($this->gui_class_name, "ref_id", "");
1061  $this->ctrl->setParameterByClass($this->gui_class_name, "wsp_id", $this->ref_id);
1062  return $this->ctrl->getLinkTargetByClass($this->gui_class_name, $a_cmd);
1063  }
1064  }
$_GET["client_id"]
static _isActive()
Static getter.
getCommandId()
get command id Normally the ref id.
static getInstance()
Get singelton iunstance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCommands()

ilObjectListGUI::getCommands ( )

get all current commands for a specific ref id (in the permission context of the current user)

!!!NOTE!!!: Please use getListHTML() if you want to display the item including all commands

!!!NOTE 2!!!: Please do not overwrite this method in derived classes becaus it will get pretty large and much code will be simply copy-and-pasted. Insert smaller object type related method calls instead. (like getCommandLink() or getCommandFrame())

public

Parameters
int$a_ref_idref id of object
Returns
array array of command arrays including "permission" => permission name "cmd" => command "link" => command link url "frame" => command link frame "lang_var" => language variable of command "granted" => true/false: command granted or not "access_info" => access info object (to do: implementation)

Definition at line 1371 of file class.ilObjectListGUI.php.

References $cmd, $ilBench, checkCommandAccess(), getCommandFrame(), getCommandImage(), and getCommandLink().

Referenced by insertCommands(), and insertPaymentCommand().

1372  {
1373  global $ilAccess, $ilBench;
1374 
1375  $ref_commands = array();
1376  foreach($this->commands as $command)
1377  {
1378  $permission = $command["permission"];
1379  $cmd = $command["cmd"];
1380  $lang_var = $command["lang_var"];
1381  $txt = "";
1382  $info_object = null;
1383 
1384  if (isset($command["txt"]))
1385  {
1386  $txt = $command["txt"];
1387  }
1388 
1389  // BEGIN WebDAV: Suppress commands that don't make sense for anonymous users.
1390  // Suppress commands that don't make sense for anonymous users
1391  global $ilias;
1392  if ($ilias->account->getId() == ANONYMOUS_USER_ID &&
1393  $command['enable_anonymous'] == 'false')
1394  {
1395  continue;
1396  }
1397  // END WebDAV: Suppress commands that don't make sense for anonymous users.
1398 
1399  // all access checking should be made within $ilAccess and
1400  // the checkAccess of the ilObj...Access classes
1401  $ilBench->start("ilObjectListGUI", "4110_get_commands_check_access");
1402  //$access = $ilAccess->checkAccess($permission, $cmd, $this->ref_id, $this->type);
1403  $access = $this->checkCommandAccess($permission,$cmd,$this->ref_id,$this->type);
1404  $ilBench->stop("ilObjectListGUI", "4110_get_commands_check_access");
1405 
1406  if ($access)
1407  {
1408  $cmd_link = $this->getCommandLink($command["cmd"]);
1409  $cmd_frame = $this->getCommandFrame($command["cmd"]);
1410  $cmd_image = $this->getCommandImage($command["cmd"]);
1411  $access_granted = true;
1412  }
1413  else
1414  {
1415  $access_granted = false;
1416  $info_object = $ilAccess->getInfo();
1417  }
1418 
1419  if (!isset($command["default"]))
1420  {
1421  $command["default"] = "";
1422  }
1423  $ref_commands[] = array(
1424  "permission" => $permission,
1425  "cmd" => $cmd,
1426  "link" => $cmd_link,
1427  "frame" => $cmd_frame,
1428  "lang_var" => $lang_var,
1429  "txt" => $txt,
1430  "granted" => $access_granted,
1431  "access_info" => $info_object,
1432  "img" => $cmd_image,
1433  "default" => $command["default"]
1434  );
1435  }
1436 
1437  return $ref_commands;
1438  }
getCommandLink($a_cmd)
Get command link url.
$cmd
Definition: sahs_server.php:35
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
getCommandFrame($a_cmd)
Get command target frame.
getCommandImage($a_cmd)
Get command icon image.
global $ilBench
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCommandsHTML()

ilObjectListGUI::getCommandsHTML ( )

Get commands HTML (must be called after get list item html)

Definition at line 3660 of file class.ilObjectListGUI.php.

References insertCommands().

3661  {
3662  return $this->insertCommands();
3663  }
insertCommands($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
insert all commands into html code
+ Here is the call graph for this function:

◆ getCommandsStatus()

ilObjectListGUI::getCommandsStatus ( )
Parameters
bool
Returns
bool

Definition at line 607 of file class.ilObjectListGUI.php.

References $commands_enabled.

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), getListItemHTML(), insertCommands(), insertIconsAndCheckboxes(), ilCourseObjectiveListGUI\insertTitle(), and insertTitle().

608  {
610  }
+ Here is the caller graph for this function:

◆ getContainerObject()

ilObjectListGUI::getContainerObject ( )

get container object

public

Parameters

Definition at line 167 of file class.ilObjectListGUI.php.

Referenced by enableDownloadCheckbox(), getListItemHTML(), insertCutCommand(), insertDeleteCommand(), insertLinkCommand(), insertMultiDownloadCommand(), insertPasteCommand(), ilCourseObjectiveListGUI\insertProgressInfo(), insertSubscribeCommand(), and ilCourseObjectiveListGUI\insertTitle().

168  {
169  return $this->container_obj;
170  }
+ Here is the caller graph for this function:

◆ getCopyStatus()

ilObjectListGUI::getCopyStatus ( )
Parameters
bool
Returns
bool

Definition at line 501 of file class.ilObjectListGUI.php.

References $copy_enabled.

502  {
503  return $this->copy_enabled;
504  }

◆ getCustomProperties()

ilObjectListGUI::getCustomProperties (   $a_prop)

get custom properties

Definition at line 1276 of file class.ilObjectListGUI.php.

Referenced by insertProperties().

1277  {
1278  if (is_array($this->cust_prop))
1279  {
1280  foreach($this->cust_prop as $prop)
1281  {
1282  $a_prop[] = $prop;
1283  }
1284  }
1285  return $a_prop;
1286  }
+ Here is the caller graph for this function:

◆ getCutStatus()

ilObjectListGUI::getCutStatus ( )
Parameters
bool
Returns
bool

Definition at line 479 of file class.ilObjectListGUI.php.

480  {
481  return $this->cut_enabled;
482  }

◆ getDeleteStatus()

ilObjectListGUI::getDeleteStatus ( )
Parameters
bool
Returns
bool

Definition at line 457 of file class.ilObjectListGUI.php.

458  {
459  return $this->delete_enabled;
460  }

◆ getDescription()

ilObjectListGUI::getDescription ( )

getDescription overwritten in class.ilObjLinkResourceList.php

Returns
string description

Definition at line 795 of file class.ilObjectListGUI.php.

Referenced by insertDescription().

796  {
797  return $this->description;
798  }
+ Here is the caller graph for this function:

◆ getDescriptionStatus()

ilObjectListGUI::getDescriptionStatus ( )
Parameters
bool
Returns
bool

Definition at line 280 of file class.ilObjectListGUI.php.

References $description_enabled.

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), and getListItemHTML().

281  {
283  }
+ Here is the caller graph for this function:

◆ getDetailsLevel()

ilObjectListGUI::getDetailsLevel ( )

Get current details level.

Returns

Definition at line 888 of file class.ilObjectListGUI.php.

References $details_level.

Referenced by ilObjSessionListGUI\getProperties(), getProperties(), and ilObjForumListGUI\initItem().

889  {
890  return $this->details_level;
891  }
+ Here is the caller graph for this function:

◆ getDownloadCheckboxState()

ilObjectListGUI::getDownloadCheckboxState ( )

Definition at line 2951 of file class.ilObjectListGUI.php.

References $download_checkbox_state.

Referenced by insertIconsAndCheckboxes().

2952  {
2954  }
+ Here is the caller graph for this function:

◆ getExpandStatus()

ilObjectListGUI::getExpandStatus ( )

Is expand/collapse enabled.

Returns
boolean icons enabled?

Definition at line 412 of file class.ilObjectListGUI.php.

References $expand_enabled.

Referenced by insertIconsAndCheckboxes().

413  {
414  return $this->expand_enabled;
415  }
+ Here is the caller graph for this function:

◆ getHeaderAction()

ilObjectListGUI::getHeaderAction ( )

Get header action.

Returns
string

Definition at line 3037 of file class.ilObjectListGUI.php.

References $comments_enabled, $ilUser, $lng, $obj_id, $tpl, ilNote\_countNotesAndComments(), ilObject\_lookupType(), addHeaderIcon(), addHeaderIconHTML(), ilTooltipGUI\addTooltip(), ilUtil\getImagePath(), ilNoteGUI\getListCommentsJSCall(), ilNoteGUI\getListNotesJSCall(), ilTaggingGUI\getListTagsJSCall(), ilTagging\getTagsForUserAndObject(), IL_NOTE_PRIVATE, IL_NOTE_PUBLIC, ilUtil\img(), insertCommands(), and isCommentsActivated().

3038  {
3039  global $ilUser, $lng, $tpl;
3040 
3041  $htpl = new ilTemplate("tpl.header_action.html", true, true, "Services/Repository");
3042 
3043  $redraw_js = "il.Object.redrawActionHeader();";
3044 
3045  // tags
3046  if($this->tags_enabled)
3047  {
3048  include_once("./Services/Tagging/classes/class.ilTagging.php");
3049  $tags = ilTagging::getTagsForUserAndObject($this->obj_id,
3050  ilObject::_lookupType($this->obj_id), 0, "", $ilUser->getId());
3051  if (count($tags) > 0)
3052  {
3053  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
3054  $lng->loadLanguageModule("tagging");
3055  $this->addHeaderIcon("tags",
3056  ilUtil::getImagePath("icon_tags_s.png"),
3057  $lng->txt("tagging_tags").": ".count($tags),
3058  ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $redraw_js),
3059  count($tags));
3060  }
3061  }
3062 
3063  // notes and comments
3064  $comments_enabled = $this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, true, false);
3065  if($this->notes_enabled || $comments_enabled)
3066  {
3067  include_once("./Services/Notes/classes/class.ilNote.php");
3068  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
3069  $cnt = ilNote::_countNotesAndComments($this->obj_id, $this->sub_obj_id);
3070 
3071  if($this->notes_enabled && $cnt[$this->obj_id][IL_NOTE_PRIVATE] > 0)
3072  {
3073  $this->addHeaderIcon("notes",
3074  ilUtil::getImagePath("note_unlabeled.png"),
3075  $lng->txt("private_notes").": ".$cnt[$this->obj_id][IL_NOTE_PRIVATE],
3076  ilNoteGUI::getListNotesJSCall($this->ajax_hash, $redraw_js),
3078  );
3079  }
3080 
3081  if($comments_enabled && $cnt[$this->obj_id][IL_NOTE_PUBLIC] > 0)
3082  {
3083  $lng->loadLanguageModule("notes");
3084 
3085  $this->addHeaderIcon("comments",
3086  ilUtil::getImagePath("comment_unlabeled.png"),
3087  $lng->txt("notes_public_comments").": ".$cnt[$this->obj_id][IL_NOTE_PUBLIC],
3088  ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $redraw_js),
3089  $cnt[$this->obj_id][IL_NOTE_PUBLIC]);
3090  }
3091  }
3092 
3093  // rating
3094  if($this->rating_enabled)
3095  {
3096  include_once("./Services/Rating/classes/class.ilRatingGUI.php");
3097  $rating_gui = new ilRatingGUI();
3098  $rating_gui->enableCategories($this->rating_categories_enabled);
3099  // never rate sub objects from header action!
3100  $rating_gui->setObject($this->obj_id, $this->type);
3101  if($this->rating_text)
3102  {
3103  $rating_gui->setYourRatingText($this->rating_text);
3104  }
3105 
3106  $this->ctrl->setParameterByClass("ilRatingGUI", "cadh", $this->ajax_hash);
3107  $this->ctrl->setParameterByClass("ilRatingGUI", "rnsb", true);
3108  if($this->rating_ctrl_path)
3109  {
3110  $rating_gui->setCtrlPath($this->rating_ctrl_path);
3111  $ajax_url = $this->ctrl->getLinkTargetByClass($this->rating_ctrl_path, "saveRating", "", true, false);
3112  }
3113  else
3114  {
3115  // ???
3116  $ajax_url = $this->ctrl->getLinkTargetByClass("ilRatingGUI", "saveRating", "", true, false);
3117  }
3118  $tpl->addOnLoadCode("il.Object.setRatingUrl('".$ajax_url."');");
3119 
3120  $this->addHeaderIconHTML("rating",
3121  $rating_gui->getHtml(true,
3122  $this->checkCommandAccess("read", "", $this->ref_id, $this->type),
3123  "il.Object.saveRating(%rating%);"));
3124  }
3125 
3126  if($this->header_icons)
3127  {
3128  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
3129 
3130  $chunks = array();
3131  foreach($this->header_icons as $id => $attr)
3132  {
3133  $id = "headp_".$id;
3134 
3135  if(is_array($attr))
3136  {
3137  if($attr["onclick"])
3138  {
3139  $htpl->setCurrentBlock("onclick");
3140  $htpl->setVariable("PROP_ONCLICK", $attr["onclick"]);
3141  $htpl->parseCurrentBlock();
3142  }
3143 
3144  if($attr["status_text"])
3145  {
3146  $htpl->setCurrentBlock("status");
3147  $htpl->setVariable("PROP_TXT", $attr["status_text"]);
3148  $htpl->parseCurrentBlock();
3149  }
3150 
3151  if(!$attr["href"])
3152  {
3153  $attr["href"] = "#";
3154  }
3155 
3156  $htpl->setCurrentBlock("prop");
3157  $htpl->setVariable("PROP_ID", $id);
3158  $htpl->setVariable("IMG", ilUtil::img($attr["img"]));
3159  $htpl->setVariable("PROP_HREF", $attr["href"]);
3160  $htpl->parseCurrentBlock();
3161 
3162  if($attr["tooltip"])
3163  {
3164  ilTooltipGUI::addTooltip($id, $attr["tooltip"]);
3165  }
3166  }
3167  else
3168  {
3169  $chunks[] = $attr;
3170  }
3171  }
3172 
3173  if(sizeof($chunks))
3174  {
3175  $htpl->setVariable("PROP_CHUNKS",
3176  implode("&nbsp;&nbsp;&nbsp;", $chunks)."&nbsp;&nbsp;&nbsp;");
3177  }
3178  }
3179 
3180  $htpl->setVariable("ACTION_DROP_DOWN",
3181  $this->insertCommands(false, false, "", true));
3182 
3183  return $htpl->get();
3184  }
getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
const IL_NOTE_PRIVATE
Definition: class.ilNote.php:4
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="")
Build img tag.
addHeaderIcon($a_id, $a_img, $a_tooltip=null, $a_onclick=null, $a_status_text=null, $a_href=null)
static _countNotesAndComments($a_rep_obj_id, $a_sub_obj_id=null)
Get all notes related to a specific object.
static getTagsForUserAndObject($a_obj_id, $a_obj_type, $a_sub_obj_id, $a_sub_obj_type, $a_user_id)
Get tags for a user and an object.
getListTagsJSCall($a_hash, $a_update_code=null)
Get tagging js call.
Class ilRatingGUI.
static addTooltip($a_el_id, $a_text, $a_container="", $a_my="bottom center", $a_at="top center", $a_use_htmlspecialchars=true)
Adds a tooltip to an HTML element.
const IL_NOTE_PUBLIC
Definition: class.ilNote.php:5
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilUser
Definition: imgupload.php:15
addHeaderIconHTML($a_id, $a_html)
isCommentsActivated($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access=true)
Check comments status against comments settings and context.
global $lng
Definition: privfeed.php:40
insertCommands($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
insert all commands into html code
getListNotesJSCall($a_hash, $a_update_code=null)
Get list notes js call.
+ Here is the call graph for this function:

◆ getIconImageType()

ilObjectListGUI::getIconImageType ( )

Returns the icon image type.

For most objects, this is same as the object type, e.g. 'cat','fold'. We can return here other values, to express a specific state of an object, e.g. 'crs_offline", and/or to express a specific kind of object, e.g. 'file_inline'.

Definition at line 1448 of file class.ilObjectListGUI.php.

References $type.

Referenced by insertIconsAndCheckboxes().

1449  {
1450  if ($this->type == "sahs" && $this->offline_mode) {
1451  return $this->type . "_offline";
1452  }
1453  return $this->type;
1454  }
+ Here is the caller graph for this function:

◆ getIconStatus()

ilObjectListGUI::getIconStatus ( )

Are icons enabled?

Returns
boolean icons enabled?

Definition at line 372 of file class.ilObjectListGUI.php.

References $icons_enabled.

Referenced by insertIconsAndCheckboxes().

373  {
374  return $this->icons_enabled;
375  }
+ Here is the caller graph for this function:

◆ getInfoScreenStatus()

ilObjectListGUI::getInfoScreenStatus ( )
Parameters
bool
Returns
bool

Definition at line 638 of file class.ilObjectListGUI.php.

References $info_screen_enabled.

Referenced by insertCommands().

639  {
641  }
+ Here is the caller graph for this function:

◆ getItemDetailLinkStatus()

ilObjectListGUI::getItemDetailLinkStatus ( )

get item detail link status

public

Returns
bool

Definition at line 709 of file class.ilObjectListGUI.php.

References $item_detail_links_enabled.

Referenced by getListItemHTML().

710  {
712  }
+ Here is the caller graph for this function:

◆ getLinkStatus()

ilObjectListGUI::getLinkStatus ( )
Parameters
bool
Returns
bool

Definition at line 565 of file class.ilObjectListGUI.php.

566  {
567  return $this->link_enabled;
568  }

◆ getListItemHTML()

ilObjectListGUI::getListItemHTML (   $a_ref_id,
  $a_obj_id,
  $a_title,
  $a_description,
  $a_use_asynch = false,
  $a_get_asynch_commands = false,
  $a_asynch_url = "",
  $a_context = self::CONTEXT_REPOSITORY 
)

Get all item information (title, commands, description) in HTML.

public

Parameters
int$a_ref_iditem reference id
int$a_obj_iditem object id
int$a_titleitem title
int$a_descriptionitem description
bool$a_use_asynch
bool$a_get_asynch_commands
string$a_asynch_url
bool$a_contextworkspace/tree context
Returns
string html code

Definition at line 3430 of file class.ilObjectListGUI.php.

References $ilBench, $ilCtrl, $ilUser, $type, ilObjFileAccess\_isFileHidden(), ilObject\_lookupType(), addCustomProperty(), ilCommonActionDispatcherGUI\buildAjaxHash(), checkCommandAccess(), enabledRelevance(), getAdditionalInformation(), getCommandsStatus(), getContainerObject(), getDescriptionStatus(), getItemDetailLinkStatus(), getNoticePropertiesStatus(), getPreconditionsStatus(), getProgressInfoStatus(), getPropertiesStatus(), getSearchFragmentStatus(), getSeparateCommands(), getUniqueItemId(), ilRating\hasRatingInListGUI(), IL_LIST_AS_TRIGGER, initItem(), insertCommands(), insertDescription(), insertFileUpload(), insertIconsAndCheckboxes(), insertItemDetailLinks(), insertNoticeProperties(), insertPath(), insertPositionField(), insertPreconditions(), insertProgressInfo(), insertProperties(), insertRelevance(), insertSearchFragment(), insertSubItems(), insertTitle(), isFileUploadAllowed(), isMode(), setAjaxHash(), storeAccessCache(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ilCommonActionDispatcherGUI\TYPE_WORKSPACE.

3432  {
3433  global $ilAccess, $ilBench, $ilUser, $ilCtrl;
3434 
3435  // this variable stores wheter any admin commands
3436  // are included in the output
3437  $this->adm_commands_included = false;
3438 
3439  // only for permformance exploration
3440  $type = ilObject::_lookupType($a_obj_id);
3441 
3442  // initialization
3443  $ilBench->start("ilObjectListGUI", "1000_getListHTML_init$type");
3444  $this->initItem($a_ref_id, $a_obj_id, $a_title, $a_description, $a_context);
3445  $ilBench->stop("ilObjectListGUI", "1000_getListHTML_init$type");
3446 
3447  // prepare ajax calls
3448  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
3449  if($a_context == self::CONTEXT_REPOSITORY)
3450  {
3452  }
3453  else
3454  {
3456  }
3457  $this->setAjaxHash(ilCommonActionDispatcherGUI::buildAjaxHash($node_type, $a_ref_id, $type, $a_obj_id));
3458 
3459  if ($a_use_asynch && $a_get_asynch_commands)
3460  {
3461  return $this->insertCommands(true, true);
3462  }
3463 
3464  if($this->rating_enabled)
3465  {
3466  if(ilRating::hasRatingInListGUI($this->obj_id, $this->type))
3467  {
3468  $may_rate = $this->checkCommandAccess("read", "", $this->ref_id, $this->type);
3469 
3470  $rating = new ilRatingGUI();
3471  $rating->setObject($this->obj_id, $this->type);
3472  $this->addCustomProperty(
3473  $this->lng->txt("rating_average_rating"),
3474  $rating->getListGUIProperty($this->ref_id, $may_rate, $this->ajax_hash, $this->parent_ref_id),
3475  false,
3476  true
3477  );
3478  }
3479  }
3480 
3481  // read from cache
3482  include_once("Services/Object/classes/class.ilListItemAccessCache.php");
3483  $this->acache = new ilListItemAccessCache();
3484  $cres = $this->acache->getEntry($ilUser->getId().":".$a_ref_id);
3485  if($this->acache->getLastAccessStatus() == "hit")
3486  {
3487  $this->access_cache = unserialize($cres);
3488  }
3489  else
3490  {
3491  // write to cache
3492  $this->storeAccessCache();
3493  }
3494 
3495  // visible check
3496  if (!$this->checkCommandAccess("visible", "", $a_ref_id, "", $a_obj_id))
3497  {
3498  $ilBench->stop("ilObjectListGUI", "2000_getListHTML_check_visible");
3499  return "";
3500  }
3501 
3502  // BEGIN WEBDAV
3503  if($type=='file' AND ilObjFileAccess::_isFileHidden($a_title))
3504  {
3505  return "";
3506  }
3507  // END WEBDAV
3508 
3509 
3510  $this->tpl = new ilTemplate("tpl.container_list_item.html", true, true,
3511  "Services/Container", "DEFAULT", false, true);
3512 
3513  if ($this->getCommandsStatus() ||
3514  ($this->payment_enabled && IS_PAYMENT_ENABLED))
3515  {
3516  if (!$this->getSeparateCommands())
3517  {
3518  $this->tpl->setVariable("COMMAND_SELECTION_LIST",
3519  $this->insertCommands($a_use_asynch, $a_get_asynch_commands, $a_asynch_url));
3520  }
3521  }
3522 
3523  if($this->getProgressInfoStatus())
3524  {
3525  $this->insertProgressInfo();
3526  }
3527 
3528  // insert title and describtion
3529  $this->insertTitle();
3530  if (!$this->isMode(IL_LIST_AS_TRIGGER))
3531  {
3532  if ($this->getDescriptionStatus())
3533  {
3534  $this->insertDescription();
3535  }
3536  }
3537 
3538  if($this->getSearchFragmentStatus())
3539  {
3540  $this->insertSearchFragment();
3541  }
3542  if($this->enabledRelevance())
3543  {
3544  $this->insertRelevance();
3545  }
3546 
3547  // properties
3548  $ilBench->start("ilObjectListGUI", "6000_insert_properties$type");
3549  if ($this->getPropertiesStatus())
3550  {
3551  $this->insertProperties();
3552  }
3553  $ilBench->stop("ilObjectListGUI", "6000_insert_properties$type");
3554 
3555  // notice properties
3556  $ilBench->start("ilObjectListGUI", "6500_insert_notice_properties$type");
3557  if($this->getNoticePropertiesStatus())
3558  {
3559  $this->insertNoticeProperties();
3560  }
3561  $ilBench->stop("ilObjectListGUI", "6500_insert_notice_properties$type");
3562 
3563  // preconditions
3564  $ilBench->start("ilObjectListGUI", "7000_insert_preconditions");
3565  if ($this->getPreconditionsStatus())
3566  {
3567  $this->insertPreconditions();
3568  }
3569  $ilBench->stop("ilObjectListGUI", "7000_insert_preconditions");
3570 
3571  // path
3572  $ilBench->start("ilObjectListGUI", "8000_insert_path");
3573  $this->insertPath();
3574  $ilBench->stop("ilObjectListGUI", "8000_insert_path");
3575 
3576  $ilBench->start("ilObjectListGUI", "8500_item_detail_links");
3577  if($this->getItemDetailLinkStatus())
3578  {
3579  $this->insertItemDetailLinks();
3580  }
3581  $ilBench->stop("ilObjectListGUI", "8500_item_detail_links");
3582 
3583  // icons and checkboxes
3584  $this->insertIconsAndCheckboxes();
3585 
3586  // input field for position
3587  $this->insertPositionField();
3588 
3589  // subitems
3590  $this->insertSubItems();
3591 
3592  // file upload
3593  if ($this->isFileUploadAllowed())
3594  {
3595  $this->insertFileUpload();
3596  }
3597 
3598  // reset properties and commands
3599  $this->cust_prop = array();
3600  $this->cust_commands = array();
3601  $this->sub_item_html = array();
3602  $this->position_enabled = false;
3603 
3604  $this->tpl->setVariable("DIV_CLASS",'ilContainerListItemOuter');
3605  $this->tpl->setVariable("DIV_ID", 'id = "'.$this->getUniqueItemId(true).'"');
3606  $this->tpl->setVariable("ADDITIONAL", $this->getAdditionalInformation());
3607 
3608  // #11554 - make sure that internal ids are reset
3609  $this->ctrl->setParameter($this->getContainerObject(), "item_ref_id", "");
3610 
3611  return $this->tpl->get();
3612  }
getProgressInfoStatus()
get progress info status
insertTitle()
insert item title
insertIconsAndCheckboxes()
Insert icons and checkboxes.
insertSearchFragment()
Insert highlighted search fragment.
isMode($a_mode)
check current output mode
getContainerObject()
get container object
storeAccessCache()
Store access cache.
const IL_LIST_AS_TRIGGER
insertPreconditions()
insert all missing preconditions
static _isFileHidden($a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user. ...
getAdditionalInformation()
Get additional information.
getItemDetailLinkStatus()
get item detail link status
static hasRatingInListGUI($a_obj_id, $a_obj_type)
global $ilCtrl
Definition: ilias.php:18
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
insertPositionField()
Insert field for positioning.
isFileUploadAllowed()
Gets a value indicating whether file uploads to this object are allowed or not.
Class ilRatingGUI.
static buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type=null, $a_sub_id=null)
Build ajax hash.
insertProgressInfo()
insert progress info
insertSubItems()
Insert subitems.
enabledRelevance()
enabled relevance
special template class to simplify handling of ITX/PEAR
getSearchFragmentStatus()
Show hide search result fragments.
insertItemDetailLinks()
insert item detail links
static _lookupType($a_id, $a_reference=false)
lookup object type
Caches (check) access information on list items.
addCustomProperty($a_property="", $a_value="", $a_alert=false, $a_newline=false)
add custom property
insertProperties($a_item='')
insert properties
global $ilUser
Definition: imgupload.php:15
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
getSeparateCommands()
Get separate commands.
global $ilBench
Definition: ilias.php:18
insertCommands($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
insert all commands into html code
insertDescription()
insert item description
insertFileUpload()
Inserts a file upload component.
insertRelevance()
insert relevance
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="", $a_context=self::CONTEXT_REPOSITORY)
inititialize new item (is called by getItemHTML())
+ Here is the call graph for this function:

◆ getMode()

ilObjectListGUI::getMode ( )

get output mode

Returns
string output mode (IL_LIST_FULL | IL_LIST_AS_TRIGGER)

Definition at line 1688 of file class.ilObjectListGUI.php.

1689  {
1690  return $this->mode;
1691  }

◆ getNoticeProperties()

ilObjectListGUI::getNoticeProperties ( )

get notice properties

Definition at line 1308 of file class.ilObjectListGUI.php.

Referenced by insertNoticeProperties().

1309  {
1310  $this->notice_prop = array();
1311  if($infos = $this->ldap_mapping->getInfoStrings($this->obj_id,true))
1312  {
1313  foreach($infos as $info)
1314  {
1315  $this->notice_prop[] = array('value' => $info);
1316  }
1317  }
1318  return $this->notice_prop ? $this->notice_prop : array();
1319  }
+ Here is the caller graph for this function:

◆ getNoticePropertiesStatus()

ilObjectListGUI::getNoticePropertiesStatus ( )

Definition at line 235 of file class.ilObjectListGUI.php.

References $notice_properties_enabled.

Referenced by getListItemHTML().

236  {
238  }
+ Here is the caller graph for this function:

◆ getPathStatus()

ilObjectListGUI::getPathStatus ( )
Parameters
bool
Returns
bool

Definition at line 586 of file class.ilObjectListGUI.php.

Referenced by insertPath().

587  {
588  return $this->path_enabled;
589  }
+ Here is the caller graph for this function:

◆ getPaymentStatus()

ilObjectListGUI::getPaymentStatus ( )
Parameters
bool
Returns
bool

Definition at line 544 of file class.ilObjectListGUI.php.

545  {
546  return $this->payment_enabled;
547  }

◆ getPreconditionsStatus()

ilObjectListGUI::getPreconditionsStatus ( )
Parameters
bool
Returns
bool

Definition at line 258 of file class.ilObjectListGUI.php.

References $preconditions_enabled.

Referenced by getListItemHTML().

259  {
261  }
+ Here is the caller graph for this function:

◆ getProgressInfoStatus()

ilObjectListGUI::getProgressInfoStatus ( )

get progress info status

public

Parameters

Definition at line 662 of file class.ilObjectListGUI.php.

References $progress_enabled.

Referenced by getListItemHTML().

663  {
665  }
+ Here is the caller graph for this function:

◆ getProperties()

ilObjectListGUI::getProperties (   $a_item = '')

Get item properties.

Overwrite this method to add properties at the bottom of the item html

Returns
array array of property arrays: "alert" (boolean) => display as an alert property (usually in red) "property" (string) => property name "value" (string) => property value

Definition at line 1118 of file class.ilObjectListGUI.php.

References $ilUser, $lng, ilDAVActivationChecker\_isActive(), ilChangeEvent\_isActive(), ilChangeEvent\_lookupChangeState(), ilChangeEvent\_lookupInsideChangeState(), and getDetailsLevel().

Referenced by getAlertProperties(), ilObjForumListGUI\initItem(), and insertProperties().

1119  {
1120  global $objDefinition;
1121 
1122  $props = array();
1123  // please list alert properties first
1124  // example (use $lng->txt instead of "Status"/"Offline" strings):
1125  // $props[] = array("alert" => true, "property" => "Status", "value" => "Offline");
1126  // $props[] = array("alert" => false, "property" => ..., "value" => ...);
1127  // ...
1128 
1129  // #8280: WebDav is only supported in repository
1130  if($this->context == self::CONTEXT_REPOSITORY)
1131  {
1132  // BEGIN WebDAV Display locking information
1133  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1135  {
1136  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
1137  global $ilias, $lng;
1138 
1139  // Show lock info
1140  require_once('Services/WebDAV/classes/class.ilDAVLocks.php');
1141  $davLocks = new ilDAVLocks();
1142  if ($ilias->account->getId() != ANONYMOUS_USER_ID)
1143  {
1144  $locks =& $davLocks->getLocksOnObjectObj($this->obj_id);
1145  if (count($locks) > 0)
1146  {
1147  $lockUser = new ilObjUser($locks[0]['ilias_owner']);
1148 
1149  $props[] = array(
1150  "alert" => false,
1151  "property" => $lng->txt("in_use_by"),
1152  "value" => $lockUser->getLogin(),
1153  "link" => "./ilias.php?user=".$locks[0]['ilias_owner'].'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI',
1154  );
1155  }
1156  }
1157  // END WebDAV Display locking information
1158 
1159  if($this->getDetailsLevel() == self::DETAILS_SEARCH)
1160  {
1161  return $props;
1162  }
1163 
1164  // BEGIN WebDAV Display warning for invisible Unix files and files with special characters
1165  if (preg_match('/^(\\.|\\.\\.)$/', $this->title))
1166  {
1167  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1168  "value" => $lng->txt("filename_special_filename"),
1169  'propertyNameVisible' => false);
1170  }
1171  else if (preg_match('/^\\./', $this->title))
1172  {
1173  $props[] = array("alert" => false, "property" => $lng->txt("filename_visibility"),
1174  "value" => $lng->txt("filename_hidden_unix_file"),
1175  'propertyNameVisible' => false);
1176  }
1177  else if (preg_match('/~$/', $this->title))
1178  {
1179  $props[] = array("alert" => false, "property" => $lng->txt("filename_visibility"),
1180  "value" => $lng->txt("filename_hidden_backup_file"),
1181  'propertyNameVisible' => false);
1182  }
1183  else if (preg_match('/[\\/]/', $this->title))
1184  {
1185  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1186  "value" => $lng->txt("filename_special_characters"),
1187  'propertyNameVisible' => false);
1188  }
1189  else if (preg_match('/[\\\\\\/:*?"<>|]/', $this->title))
1190  {
1191  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1192  "value" => $lng->txt("filename_windows_special_characters"),
1193  'propertyNameVisible' => false);
1194  }
1195  else if (preg_match('/\\.$/', $this->title))
1196  {
1197  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1198  "value" => $lng->txt("filename_windows_empty_extension"),
1199  'propertyNameVisible' => false);
1200  }
1201  else if (preg_match('/^(\\.|\\.\\.)$/', $this->title))
1202  {
1203  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1204  "value" => $lng->txt("filename_special_filename"),
1205  'propertyNameVisible' => false);
1206  }
1207  else if (preg_match('/#/', $this->title))
1208  {
1209  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1210  "value" => $lng->txt("filename_windows_webdav_issue"),
1211  'propertyNameVisible' => false);
1212  }
1213  }
1214  // END WebDAV Display warning for invisible files and files with special characters
1215 
1216  // BEGIN ChangeEvent: display changes.
1217  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
1219  {
1220  global $ilias, $lng, $ilUser;
1221  if ($ilias->account->getId() != ANONYMOUS_USER_ID)
1222  {
1223  // Performance improvement: for container objects
1224  // we only display 'changed inside' events, for
1225  // leaf objects we only display 'object new/changed'
1226  // events
1227  $isContainer = in_array($this->type, array('cat', 'fold', 'crs', 'grp'));
1228  if($isContainer)
1229  {
1230  $state = ilChangeEvent::_lookupInsideChangeState($this->obj_id, $ilUser->getId());
1231  if($state > 0)
1232  {
1233  $props[] = array(
1234  "alert" => true,
1235  "value" => $lng->txt('state_changed_inside'),
1236  'propertyNameVisible' => false);
1237  }
1238  }
1239  /*
1240  * elseif(!$objDefinition->isAdministrationObject(ilObject::_lookupType($this->obj_id)))
1241  *
1242  * only files support write events properly
1243  */
1244  elseif($this->type == "file")
1245  {
1246  $state = ilChangeEvent::_lookupChangeState($this->obj_id, $ilUser->getId());
1247  if($state > 0)
1248  {
1249  $props[] = array(
1250  "alert" => true,
1251  "value" => $lng->txt(($state == 1) ? 'state_unread' : 'state_changed'),
1252  'propertyNameVisible' => false);
1253  }
1254  }
1255  }
1256  }
1257  // END ChangeEvent: display changes.
1258  }
1259 
1260  return $props;
1261  }
static _lookupInsideChangeState($parent_obj_id, $usr_id)
Returns the changed state of objects which are children of the specified parent object.
static _isActive()
Static getter.
getDetailsLevel()
Get current details level.
global $ilUser
Definition: imgupload.php:15
static _isActive()
Returns true, if change event tracking is active.
global $lng
Definition: privfeed.php:40
static _lookupChangeState($obj_id, $usr_id)
Returns the change state of the object for the specified user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPropertiesStatus()

ilObjectListGUI::getPropertiesStatus ( )
Parameters
bool
Returns
bool

Definition at line 218 of file class.ilObjectListGUI.php.

References $properties_enabled.

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), and getListItemHTML().

219  {
221  }
+ Here is the caller graph for this function:

◆ getRelevance()

ilObjectListGUI::getRelevance ( )

get relevance

Parameters

Definition at line 352 of file class.ilObjectListGUI.php.

References $relevance.

Referenced by insertRelevance().

353  {
354  return $this->relevance;
355  }
+ Here is the caller graph for this function:

◆ getSearchFragment()

ilObjectListGUI::getSearchFragment ( )

get search fragment

Returns

Definition at line 814 of file class.ilObjectListGUI.php.

References $search_fragment.

Referenced by insertSearchFragment().

815  {
816  return $this->search_fragment;
817  }
+ Here is the caller graph for this function:

◆ getSearchFragmentStatus()

ilObjectListGUI::getSearchFragmentStatus ( )

Show hide search result fragments.

Parameters
bool
Returns
bool

Definition at line 291 of file class.ilObjectListGUI.php.

References $search_fragment_enabled.

Referenced by getListItemHTML().

292  {
294  }
+ Here is the caller graph for this function:

◆ getSeparateCommands()

ilObjectListGUI::getSeparateCommands ( )

Get separate commands.

Returns
boolean separate commands

Definition at line 834 of file class.ilObjectListGUI.php.

References $separate_commands.

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), and getListItemHTML().

835  {
837  }
+ Here is the caller graph for this function:

◆ getSubscribeStatus()

ilObjectListGUI::getSubscribeStatus ( )
Parameters
bool
Returns
bool

Definition at line 523 of file class.ilObjectListGUI.php.

524  {
525  return $this->subscribe_enabled;
526  }

◆ getSubstitutionStatus()

ilObjectListGUI::getSubstitutionStatus ( )

Get substitution status.

public

Definition at line 685 of file class.ilObjectListGUI.php.

References $substitutions_enabled.

Referenced by insertDescription().

686  {
688  }
+ Here is the caller graph for this function:

◆ getTitle()

ilObjectListGUI::getTitle ( )

getTitle overwritten in class.ilObjLinkResourceList.php

Returns
string title

Definition at line 776 of file class.ilObjectListGUI.php.

Referenced by ilCourseObjectiveListGUI\insertTitle(), and insertTitle().

777  {
778  return $this->title;
779  }
+ Here is the caller graph for this function:

◆ getUniqueItemId()

ilObjectListGUI::getUniqueItemId (   $a_as_div = false)
protected

Get unique item identifier (for js-actions)

Parameters
bool$a_as_div
Returns
string

Definition at line 3630 of file class.ilObjectListGUI.php.

Referenced by getListItemHTML(), insertCommands(), insertFileUpload(), insertPreconditions(), and parseConditions().

3631  {
3632  // use correct id for references
3633  $id_ref = ($this->reference_ref_id > 0)
3634  ? $this->reference_ref_id
3635  : $this->ref_id;
3636 
3637  // add unique identifier for preconditions (objects can appear twice in same container)
3638  if($this->condition_depth)
3639  {
3640  $id_ref .= "_pc".$this->condition_depth;
3641  }
3642 
3643  // unique
3644  $id_ref .= "_pref_".$this->parent_ref_id;
3645 
3646  if(!$a_as_div)
3647  {
3648  return $id_ref;
3649  }
3650  else
3651  {
3652  // action menu [yellow] toggle
3653  return "lg_div_".$id_ref;
3654  }
3655  }
+ Here is the caller graph for this function:

◆ ilObjectListGUI()

ilObjectListGUI::ilObjectListGUI ( )

constructor

Definition at line 121 of file class.ilObjectListGUI.php.

References $_REQUEST, $ilCtrl, $lng, ilLDAPRoleGroupMapping\_getInstance(), enableComments(), enableNotes(), enableTags(), IL_LIST_FULL, init(), and setParentRefId().

Referenced by ilObjOrgUnitListGUI\__construct(), ilObjBookingPoolListGUI\__construct(), ilObjChatroomListGUI\__construct(), ilObjCategoryListGUI\ilObjCategoryListGUI(), ilObjCourseListGUI\ilObjCourseListGUI(), ilObjDlBookListGUI\ilObjDlBookListGUI(), ilObjExerciseListGUI\ilObjExerciseListGUI(), ilObjExternalFeedListGUI\ilObjExternalFeedListGUI(), ilObjFileBasedLMListGUI\ilObjFileBasedLMListGUI(), ilObjFileListGUI\ilObjFileListGUI(), ilObjFolderListGUI\ilObjFolderListGUI(), ilObjGlossaryListGUI\ilObjGlossaryListGUI(), ilObjGroupListGUI\ilObjGroupListGUI(), ilObjiLincClassroomListGUI\ilObjiLincClassroomListGUI(), ilObjiLincCourseListGUI\ilObjiLincCourseListGUI(), ilObjLearningModuleListGUI\ilObjLearningModuleListGUI(), ilObjLinkResourceListGUI\ilObjLinkResourceListGUI(), ilObjMediaCastListGUI\ilObjMediaCastListGUI(), ilObjMediaPoolListGUI\ilObjMediaPoolListGUI(), ilObjQuestionPoolListGUI\ilObjQuestionPoolListGUI(), ilObjRootFolderListGUI\ilObjRootFolderListGUI(), ilObjSAHSLearningModuleListGUI\ilObjSAHSLearningModuleListGUI(), ilObjSurveyListGUI\ilObjSurveyListGUI(), ilObjSurveyQuestionPoolListGUI\ilObjSurveyQuestionPoolListGUI(), ilObjTestListGUI\ilObjTestListGUI(), and ilObjWikiListGUI\ilObjWikiListGUI().

122  {
123  global $rbacsystem, $ilCtrl, $lng, $ilias;
124 
125  $this->rbacsystem = $rbacsystem;
126  $this->ilias = $ilias;
127  $this->ctrl = $ilCtrl;
128  $this->lng = $lng;
129  $this->mode = IL_LIST_FULL;
130  $this->path_enabled = false;
131 
132  $this->enableComments(false);
133  $this->enableNotes(false);
134  $this->enableTags(false);
135 
136  // unique js-ids
137  $this->setParentRefId($_REQUEST["ref_id"]);
138 
139 //echo "list";
140  $this->init();
141 
142  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
143  $this->ldap_mapping = ilLDAPRoleGroupMapping::_getInstance();
144 
145  $lng->loadLanguageModule("obj");
146  }
init()
initialisation
enableNotes($a_value)
Toogle notes action status.
global $ilCtrl
Definition: ilias.php:18
static _getInstance()
Get singleton instance of this class.
redirection script todo: (a better solution should control the processing via a xml file) ...
const IL_LIST_FULL
enableComments($a_value, $a_enable_comments_settings=true)
Toogle comments action status.
setParentRefId($a_ref_id)
Set current parent ref id to enable unique js-ids (sessions, etc.)
enableTags($a_value)
Toogle tags action status.
global $lng
Definition: privfeed.php:40
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

ilObjectListGUI::init ( )

initialisation

this method should be overwritten by derived classes

Definition at line 178 of file class.ilObjectListGUI.php.

References ilObjectAccess\_getCommands().

Referenced by ilObjectListGUI().

179  {
180  // Create static links for default command (linked title) or not
181  $this->static_link_enabled = true;
182  $this->delete_enabled = true;
183  $this->cut_enabled = true;
184  $this->subscribe_enabled = true;
185  $this->link_enabled = false;
186  $this->copy_enabled = false;
187  $this->payment_enabled = false;
188  $this->progress_enabled = false;
189  $this->notice_properties_enabled = true;
190  $this->info_screen_enabled = false;
191  $this->type = ""; // "cat", "course", ...
192  $this->gui_class_name = ""; // "ilobjcategorygui", "ilobjcoursegui", ...
193 
194  // general commands array, e.g.
195  include_once('./Services/Object/classes/class.ilObjectAccess.php');
196  $this->commands = ilObjectAccess::_getCommands();
197  }
_getCommands()
get commands
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initItem()

ilObjectListGUI::initItem (   $a_ref_id,
  $a_obj_id,
  $a_title = "",
  $a_description = "",
  $a_context = self::CONTEXT_REPOSITORY 
)

inititialize new item (is called by getItemHTML())

Parameters
int$a_ref_idreference id
int$a_obj_idobject id
string$a_titletitle
string$a_descriptiondescription
int$a_contexttree/workspace

Definition at line 970 of file class.ilObjectListGUI.php.

References ilObjSAHSLearningModuleAccess\_lookupUserIsOfflineMode(), setDescription(), and setTitle().

Referenced by ilCourseObjectiveListGUI\getListItemHTML(), and getListItemHTML().

971  {
972  $this->offline_mode = false;
973  include_once('Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php');
974  if ($this->type == "sahs") {
975  $this->offline_mode = ilObjSAHSLearningModuleAccess::_lookupUserIsOfflineMode($a_obj_id);
976  }
977  $this->access_cache = array();
978  $this->ref_id = $a_ref_id;
979  $this->obj_id = $a_obj_id;
980  $this->context = $a_context;
981  $this->setTitle($a_title);
982  $this->setDescription($a_description);
983  #$this->description = $a_description;
984 
985  // checks, whether any admin commands are included in the output
986  $this->adm_commands_included = false;
987  $this->prevent_access_caching = false;
988 
989  }
static _lookupUserIsOfflineMode($a_obj_id)
Checks offlineMode and returns false if.
setDescription($a_description)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertCommand()

ilObjectListGUI::insertCommand (   $a_href,
  $a_text,
  $a_frame = "",
  $a_img = "",
  $a_cmd = "",
  $a_onclick = "" 
)

insert command button

private

Parameters
string$a_hreflink url target
string$a_textlink text
string$a_framelink frame target

Definition at line 2172 of file class.ilObjectListGUI.php.

Referenced by insertCommands(), insertCommonSocialCommands(), insertCopyCommand(), insertCutCommand(), insertDeleteCommand(), ilObjOrgUnitListGUI\insertInfoScreenCommand(), insertInfoScreenCommand(), insertLinkCommand(), insertMultiDownloadCommand(), insertPasteCommand(), insertSubscribeCommand(), and insertTimingsCommand().

2173  {
2174  // #11099
2175  $chksum = md5($a_href.$a_text);
2176  if($a_href == "#" ||
2177  !in_array($chksum, $this->prevent_duplicate_commands))
2178  {
2179  if($a_href != "#")
2180  {
2181  $this->prevent_duplicate_commands[] = $chksum;
2182  }
2183 
2184  $prevent_background_click = false;
2185  if ($a_cmd =='mount_webfolder')
2186  {
2187  $prevent_background_click = true;
2188  }
2189  $this->current_selection_list->addItem($a_text, "", $a_href, $a_img, $a_text, $a_frame,
2190  "", $prevent_background_click, $a_onclick);
2191  }
2192  }
+ Here is the caller graph for this function:

◆ insertCommands()

ilObjectListGUI::insertCommands (   $a_use_asynch = false,
  $a_get_asynch_commands = false,
  $a_asynch_url = "",
  $a_header_actions = false 
)

insert all commands into html code

private

Parameters
object$a_tpltemplate object
int$a_ref_iditem reference id

Definition at line 2601 of file class.ilObjectListGUI.php.

References $ilUser, $lng, ilContainer\_lookupContainerSetting(), addCustomProperty(), appendRepositoryFrameParameter(), createDefaultCommand(), ilAdvancedSelectionListGUI\DOWN_ARROW_DARK, enableProperties(), getCommands(), getCommandsStatus(), ilUtil\getImagePath(), getInfoScreenStatus(), getUniqueItemId(), IL_LIST_AS_TRIGGER, IL_NO_LICENSE, ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, insertCommand(), insertCommonSocialCommands(), insertCopyCommand(), insertCutCommand(), insertDeleteCommand(), insertInfoScreenCommand(), insertLinkCommand(), insertMultiDownloadCommand(), insertPasteCommand(), insertPayment(), insertSubscribeCommand(), insertTimingsCommand(), and isMode().

Referenced by getCommandsHTML(), getHeaderAction(), ilObjiLincClassroomListGUI\getListItemHTML(), and getListItemHTML().

2603  {
2604  global $lng, $ilUser;
2605 
2606  if (!$this->getCommandsStatus())
2607  {
2608  return;
2609  }
2610 
2611  include_once("Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2612  $this->current_selection_list = new ilAdvancedSelectionListGUI();
2613  $this->current_selection_list->setAsynch($a_use_asynch && !$a_get_asynch_commands);
2614  $this->current_selection_list->setAsynchUrl($a_asynch_url);
2615  $this->current_selection_list->setListTitle($lng->txt("actions"));
2616  $this->current_selection_list->setId("act_".$this->getUniqueItemId(false));
2617  $this->current_selection_list->setSelectionHeaderClass("small");
2618  $this->current_selection_list->setItemLinkClass("xsmall");
2619  $this->current_selection_list->setLinksMode("il_ContainerItemCommand2");
2620  $this->current_selection_list->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
2621  $this->current_selection_list->setUseImages(false);
2622  $this->current_selection_list->setAdditionalToggleElement($this->getUniqueItemId(true), "ilContainerListItemOuterHighlight");
2623 
2624  include_once 'Services/Payment/classes/class.ilPaymentObject.php';
2625 
2626  $this->ctrl->setParameterByClass($this->gui_class_name, "ref_id", $this->ref_id);
2627 
2628  // only standard command?
2629  $only_default = false;
2630  if ($a_use_asynch && !$a_get_asynch_commands)
2631  {
2632  $only_default = true;
2633  }
2634 
2635  $this->default_command = false;
2636  $this->prevent_duplicate_commands = array();
2637 
2638  // we only allow the following commands inside the header actions
2639  $valid_header_commands = array("mount_webfolder");
2640 
2641  $commands = $this->getCommands($this->ref_id, $this->obj_id);
2642  foreach($commands as $command)
2643  {
2644  if($a_header_actions && !in_array($command["cmd"], $valid_header_commands))
2645  {
2646  continue;
2647  }
2648 
2649  if ($command["granted"] == true )
2650  {
2651  if (!$command["default"] === true)
2652  {
2653  if (!$this->std_cmd_only && !$only_default)
2654  {
2655  // workaround for repository frameset
2656  $command["link"] =
2657  $this->appendRepositoryFrameParameter($command["link"]);
2658 
2659  // standard edit icon
2660  if ($command["lang_var"] == "edit" && $command["img"] == "")
2661  {
2662  $command["img"] = ilUtil::getImagePath("cmd_edit_s.png");
2663  }
2664 
2665  $cmd_link = $command["link"];
2666  $txt = ($command["lang_var"] == "")
2667  ? $command["txt"]
2668  : $this->lng->txt($command["lang_var"]);
2669  $this->insertCommand($cmd_link, $txt,
2670  $command["frame"], $command["img"], $command["cmd"]);
2671  }
2672  }
2673  else
2674  {
2675  $this->default_command = $this->createDefaultCommand($command);
2676  //$this->default_command = $command;
2677  }
2678  }
2679  elseif($command["default"] === true)
2680  {
2681  $items =& $command["access_info"];
2682  foreach ($items as $item)
2683  {
2684  if ($item["type"] == IL_NO_LICENSE)
2685  {
2686  $this->addCustomProperty($this->lng->txt("license"),$item["text"],true);
2687  $this->enableProperties(true);
2688  break;
2689  }
2690  }
2691  }
2692  }
2693 
2694  if (!$only_default)
2695  {
2696  // custom commands
2697  if (is_array($this->cust_commands))
2698  {
2699  foreach ($this->cust_commands as $command)
2700  {
2701  $this->insertCommand($command["link"], $this->lng->txt($command["lang_var"]),
2702  $command["frame"], "", $command["cmd"], $command["onclick"]);
2703  }
2704  }
2705 
2706  // info screen commmand
2707  if ($this->getInfoScreenStatus())
2708  {
2709  $this->insertInfoScreenCommand();
2710  }
2711 
2712  if (!$this->isMode(IL_LIST_AS_TRIGGER))
2713  {
2714  // edit timings
2715  if($this->timings_enabled)
2716  {
2717  $this->insertTimingsCommand();
2718  }
2719 
2720  // delete
2721  if ($this->delete_enabled)
2722  {
2723  $this->insertDeleteCommand();
2724  }
2725 
2726  // link
2727  if ($this->link_enabled)
2728  {
2729  $this->insertLinkCommand();
2730  }
2731 
2732  // cut
2733  if ($this->cut_enabled)
2734  {
2735  $this->insertCutCommand();
2736  }
2737 
2738  // copy
2739  if ($this->copy_enabled)
2740  {
2741  $this->insertCopyCommand();
2742  }
2743 
2744  // cut/copy from workspace to repository
2745  if ($this->repository_transfer_enabled)
2746  {
2747  $this->insertCutCommand(true);
2748  $this->insertCopyCommand(true);
2749  }
2750 
2751  // subscribe
2752  if ($this->subscribe_enabled)
2753  {
2754  $this->insertSubscribeCommand();
2755  }
2756 
2757  // multi download
2758  if ($this->multi_download_enabled && $a_header_actions)
2759  {
2760  $this->insertMultiDownloadCommand();
2761  }
2762 
2763  // BEGIN PATCH Lucene search
2764  if($this->cut_enabled or $this->link_enabled)
2765  {
2766  $this->insertPasteCommand();
2767  }
2768  // END PATCH Lucene Search
2769 
2770  if(IS_PAYMENT_ENABLED)
2771  {
2772  $this->insertPayment();
2773  }
2774  }
2775  }
2776 
2777  // common social commands (comment, notes, tags)
2778  if (!$only_default && !$this->isMode(IL_LIST_AS_TRIGGER))
2779  {
2780  $this->insertCommonSocialCommands($a_header_actions);
2781  }
2782 
2783  if(!$a_header_actions)
2784  {
2785  $this->ctrl->clearParametersByClass($this->gui_class_name);
2786  }
2787 
2788  // fix bug #12417
2789  // there is one case, where no action menu should be displayed:
2790  // public area, category, no info tab
2791  // todo: make this faster and remove type specific implementation if possible
2792  if ($a_use_asynch && !$a_get_asynch_commands && !$a_header_actions)
2793  {
2794  if ($ilUser->getId() == ANONYMOUS_USER_ID && $this->type == "cat")
2795  {
2796  include_once("./Services/Container/classes/class.ilContainer.php");
2797  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
2799  $this->obj_id,
2801  true))
2802  {
2803  return;
2804  }
2805  }
2806  }
2807 
2808  if ($a_use_asynch && $a_get_asynch_commands)
2809  {
2810  return $this->current_selection_list->getHTML(true);
2811  }
2812 
2813  return $this->current_selection_list->getHTML();
2814  }
getCommands()
get all current commands for a specific ref id (in the permission context of the current user) ...
isMode($a_mode)
check current output mode
insertLinkCommand()
insert link command
const IL_LIST_AS_TRIGGER
insertCopyCommand($a_to_repository=false)
Insert copy command.
const IL_NO_LICENSE
enableProperties($a_status)
En/disable properties.
insertPasteCommand()
Insert paste command.
createDefaultCommand($command)
Get default command link Overwritten for e.g categories,courses => they return a goto link If search ...
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
insertSubscribeCommand()
insert subscribe command
insertDeleteCommand()
insert cut command
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
insertInfoScreenCommand()
insert info screen command
insertPayment()
insert payment information
appendRepositoryFrameParameter($a_link)
workaround: all links into the repository (from outside) must tell repository to setup the frameset ...
addCustomProperty($a_property="", $a_value="", $a_alert=false, $a_newline=false)
add custom property
User interface class for advanced drop-down selection lists.
global $ilUser
Definition: imgupload.php:15
insertTimingsCommand()
insert edit timings command
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
global $lng
Definition: privfeed.php:40
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
insertCommonSocialCommands($a_header_actions=false)
Insert common social commands (comments, notes, tagging)
insertCutCommand($a_to_repository=false)
insert cut command
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertCommonSocialCommands()

ilObjectListGUI::insertCommonSocialCommands (   $a_header_actions = false)

Insert common social commands (comments, notes, tagging)

Parameters

Definition at line 2516 of file class.ilObjectListGUI.php.

References $comments_enabled, $ilSetting, $ilUser, $lng, $ref_id, $reference_ref_id, $tpl, getCommandFrame(), getCommandLink(), ilNoteGUI\getListCommentsJSCall(), ilNoteGUI\getListNotesJSCall(), ilTaggingGUI\getListTagsJSCall(), insertCommand(), and isCommentsActivated().

Referenced by insertCommands().

2517  {
2518  global $ilSetting, $lng, $ilUser, $tpl;
2519 
2520  if ($this->std_cmd_only ||
2521  ($ilUser->getId() == ANONYMOUS_USER_ID))
2522  {
2523  return;
2524  }
2525  $lng->loadLanguageModule("notes");
2526  $lng->loadLanguageModule("tagging");
2527  $cmd_link = $this->getCommandLink("infoScreen")."#notes_top";
2528  $cmd_tag_link = $this->getCommandLink("infoScreen");
2529  $cmd_frame = $this->getCommandFrame("infoScreen");
2530  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
2531 
2532  // reference objects have translated ids, revert to originals
2533  $note_ref_id = $this->ref_id;
2534  if($this->reference_ref_id)
2535  {
2536  $note_ref_id = $this->reference_ref_id;
2537  }
2538 
2539  $js_updater = $a_header_actions
2540  ? "il.Object.redrawActionHeader();"
2541  : "il.Object.redrawListItem(".$note_ref_id.")";
2542 
2543  $comments_enabled = $this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, $a_header_actions, true);
2544  if($comments_enabled)
2545  {
2546  $this->insertCommand("#", $this->lng->txt("notes_comments"), $cmd_frame,
2547  "", "", ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $js_updater));
2548  }
2549 
2550  if($this->notes_enabled)
2551  {
2552  $this->insertCommand("#", $this->lng->txt("notes"), $cmd_frame,
2553  "", "", ilNoteGUI::getListNotesJSCall($this->ajax_hash, $js_updater));
2554  }
2555 
2556  if ($this->tags_enabled)
2557  {
2558  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
2559  //$this->insertCommand($cmd_tag_link, $this->lng->txt("tagging_set_tag"), $cmd_frame);
2560  $this->insertCommand("#", $this->lng->txt("tagging_set_tag"), $cmd_frame,
2561  "", "", ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $js_updater));
2562  }
2563  }
getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
getCommandLink($a_cmd)
Get command link url.
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
getCommandFrame($a_cmd)
Get command target frame.
getListTagsJSCall($a_hash, $a_update_code=null)
Get tagging js call.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $ilUser
Definition: imgupload.php:15
isCommentsActivated($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access=true)
Check comments status against comments settings and context.
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
getListNotesJSCall($a_hash, $a_update_code=null)
Get list notes js call.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertCopyCommand()

ilObjectListGUI::insertCopyCommand (   $a_to_repository = false)

Insert copy command.

Parameters
bool$a_to_repository

Definition at line 2344 of file class.ilObjectListGUI.php.

References checkCommandAccess(), getCommandId(), and insertCommand().

Referenced by insertCommands().

2345  {
2346  if($this->std_cmd_only)
2347  {
2348  return;
2349  }
2350 
2351  if($this->checkCommandAccess('copy', 'copy', $this->ref_id, $this->type))
2352  {
2353  if($this->context != self::CONTEXT_WORKSPACE && $this->context != self::CONTEXT_WORKSPACE_SHARING)
2354  {
2355  $this->ctrl->setParameterByClass('ilobjectcopygui','source_id',$this->getCommandId());
2356  $cmd_copy = $this->ctrl->getLinkTargetByClass('ilobjectcopygui','initTargetSelection');
2357  $this->insertCommand($cmd_copy, $this->lng->txt('copy'));
2358  }
2359  else
2360  {
2361  $this->ctrl->setParameter($this->container_obj, "ref_id",
2362  $this->container_obj->object->getRefId());
2363  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2364 
2365  if(!$a_to_repository)
2366  {
2367  $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj, 'copy');
2368  $this->insertCommand($cmd_copy, $this->lng->txt('copy'));
2369  }
2370  else
2371  {
2372  $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj, 'copy_to_repository');
2373  $this->insertCommand($cmd_copy, $this->lng->txt('wsp_copy_to_repository'));
2374  }
2375  }
2376 
2377  $this->adm_commands_included = true;
2378  }
2379  return;
2380  }
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
getCommandId()
get command id Normally the ref id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertCutCommand()

ilObjectListGUI::insertCutCommand (   $a_to_repository = false)

insert cut command

protected

Parameters
bool$a_to_repository

Definition at line 2289 of file class.ilObjectListGUI.php.

References checkCommandAccess(), getCommandId(), getContainerObject(), ilUtil\getImagePath(), and insertCommand().

Referenced by insertCommands().

2290  {
2291  global $ilAccess;
2292 
2293  if ($this->std_cmd_only)
2294  {
2295  return;
2296  }
2297  // BEGIN PATCH Lucene search
2298  if(is_object($this->getContainerObject()) and
2300  {
2301  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type))
2302  {
2303  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2304  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "cut");
2305  $this->insertCommand($cmd_link, $this->lng->txt("move"));
2306  $this->adm_commands_included = true;
2307  return true;
2308  }
2309  return false;
2310  }
2311  // END PATCH Lucene Search
2312 
2313  // if the permission is changed here, it has
2314  // also to be changed in ilContainerContentGUI, determineAdminCommands
2315  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type) &&
2316  $this->container_obj->object)
2317  {
2318  $this->ctrl->setParameter($this->container_obj, "ref_id",
2319  $this->container_obj->object->getRefId());
2320  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2321 
2322  if(!$a_to_repository)
2323  {
2324  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "cut");
2325  $this->insertCommand($cmd_link, $this->lng->txt("move"), "",
2326  ilUtil::getImagePath("cmd_move_s.png"));
2327  }
2328  else
2329  {
2330  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "cut_for_repository");
2331  $this->insertCommand($cmd_link, $this->lng->txt("wsp_move_to_repository"), "",
2332  ilUtil::getImagePath("cmd_move_s.png"));
2333  }
2334 
2335  $this->adm_commands_included = true;
2336  }
2337  }
getContainerObject()
get container object
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
getCommandId()
get command id Normally the ref id.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertDeleteCommand()

ilObjectListGUI::insertDeleteCommand ( )

insert cut command

private

Parameters
object$a_tpltemplate object
int$a_ref_iditem reference id

Definition at line 2201 of file class.ilObjectListGUI.php.

References checkCommandAccess(), getCommandId(), getContainerObject(), ilUtil\getImagePath(), and insertCommand().

Referenced by insertCommands().

2202  {
2203  if ($this->std_cmd_only)
2204  {
2205  return;
2206  }
2207 
2208  if(is_object($this->getContainerObject()) and
2210  {
2211  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type))
2212  {
2213  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2214  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "delete");
2215  $this->insertCommand($cmd_link, $this->lng->txt("delete"));
2216  $this->adm_commands_included = true;
2217  return true;
2218  }
2219  return false;
2220  }
2221 
2222  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type))
2223  {
2224  $this->ctrl->setParameter($this->container_obj, "ref_id",
2225  $this->container_obj->object->getRefId());
2226  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2227  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "delete");
2228  $this->insertCommand($cmd_link, $this->lng->txt("delete"), "",
2229  ilUtil::getImagePath("cmd_delete_s.png"));
2230  $this->adm_commands_included = true;
2231  }
2232  }
getContainerObject()
get container object
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
getCommandId()
get command id Normally the ref id.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertDescription()

ilObjectListGUI::insertDescription ( )

insert item description

private

Parameters
object$a_tpltemplate object
string$a_descitem description

Definition at line 1615 of file class.ilObjectListGUI.php.

References getDescription(), getSubstitutionStatus(), and insertSubstitutions().

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), ilCourseObjectiveListGUI\getListItemHTML(), and getListItemHTML().

1616  {
1617  if($this->getSubstitutionStatus())
1618  {
1619  $this->insertSubstitutions();
1620  if(!$this->substitutions->isDescriptionEnabled())
1621  {
1622  return true;
1623  }
1624  }
1625 
1626  $this->tpl->setCurrentBlock("item_description");
1627  $this->tpl->setVariable("TXT_DESC", $this->getDescription());
1628  $this->tpl->parseCurrentBlock();
1629  }
getDescription()
getDescription overwritten in class.ilObjLinkResourceList.php
getSubstitutionStatus()
Get substitution status.
insertSubstitutions()
Insert substitutions.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertFileUpload()

ilObjectListGUI::insertFileUpload ( )

Inserts a file upload component.

Definition at line 3791 of file class.ilObjectListGUI.php.

References getUniqueItemId(), and ilFileUploadGUI\initFileUpload().

Referenced by getListItemHTML().

3792  {
3793  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
3795 
3796  $upload = new ilFileUploadGUI($this->getUniqueItemId(true), $this->ref_id);
3797 
3798  $this->tpl->setCurrentBlock("fileupload");
3799  $this->tpl->setVariable("FILE_UPLOAD", $upload->getHTML());
3800  $this->tpl->parseCurrentBlock();
3801  }
static initFileUpload()
Initializes the file upload and loads the needed javascripts and styles.
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertIconsAndCheckboxes()

ilObjectListGUI::insertIconsAndCheckboxes ( )

Insert icons and checkboxes.

Definition at line 3270 of file class.ilObjectListGUI.php.

References $lng, ilObject\_getIcon(), getCheckboxStatus(), getCommandId(), getCommandsStatus(), getDownloadCheckboxState(), getExpandStatus(), getIconImageType(), getIconStatus(), ilUtil\getImagePath(), isExpanded(), and ilPlugin\lookupTxt().

Referenced by ilCourseObjectiveListGUI\getListItemHTML(), and getListItemHTML().

3271  {
3272  global $lng, $objDefinition;
3273 
3274  $cnt = 0;
3275  if ($this->getCheckboxStatus())
3276  {
3277  $this->tpl->setCurrentBlock("check");
3278  $this->tpl->setVariable("VAL_ID", $this->getCommandId());
3279  $this->tpl->parseCurrentBlock();
3280  $cnt += 1;
3281  }
3282  else if ($this->getDownloadCheckboxState() != self::DOWNLOAD_CHECKBOX_NONE)
3283  {
3284  $this->tpl->setCurrentBlock("check_download");
3285  if ($this->getDownloadCheckboxState() == self::DOWNLOAD_CHECKBOX_ENABLED)
3286  $this->tpl->setVariable("VAL_ID", $this->getCommandId());
3287  else
3288  $this->tpl->setVariable("VAL_VISIBILITY", "visibility: hidden;\" disabled=\"disabled");
3289  $this->tpl->parseCurrentBlock();
3290  $cnt += 1;
3291  }
3292  elseif($this->getExpandStatus())
3293  {
3294  $this->tpl->setCurrentBlock('expand');
3295 
3296  if($this->isExpanded())
3297  {
3298  $this->ctrl->setParameter($this->container_obj,'expand',-1 * $this->obj_id);
3299  $this->tpl->setVariable('EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj,'',$this->getUniqueItemId(true)));
3300  $this->ctrl->clearParameters($this->container_obj);
3301  #$this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('browser/minus.png'));
3302  $this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('tree_exp.png'));
3303  $this->tpl->setVariable('EXP_ALT',$this->lng->txt('collapse'));
3304  }
3305  else
3306  {
3307  $this->ctrl->setParameter($this->container_obj,'expand',$this->obj_id);
3308  $this->tpl->setVariable('EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj,'',$this->getUniqueItemId(true)));
3309  $this->ctrl->clearParameters($this->container_obj);
3310  #$this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('browser/plus.png'));
3311  $this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('tree_col.png'));
3312  $this->tpl->setVariable('EXP_ALT',$this->lng->txt('expand'));
3313  }
3314 
3315  $this->tpl->parseCurrentBlock();
3316  $cnt += 1;
3317  }
3318 
3319  if ($this->getIconStatus())
3320  {
3321  if ($cnt == 1)
3322  {
3323  $this->tpl->touchBlock("i_1"); // indent
3324  }
3325 
3326  // icon link
3327  if (!$this->default_command || (!$this->getCommandsStatus() && !$this->restrict_to_goto))
3328  {
3329  }
3330  else
3331  {
3332  $this->tpl->setCurrentBlock("icon_link_s");
3333 
3334  if ($this->default_command["frame"] != "")
3335  {
3336  $this->tpl->setVariable("ICON_TAR", "target='".$this->default_command["frame"]."'");
3337  }
3338 
3339  $this->tpl->setVariable("ICON_HREF",
3340  $this->default_command["link"]);
3341  $this->tpl->parseCurrentBlock();
3342  $this->tpl->touchBlock("icon_link_e");
3343  }
3344 
3345  $this->tpl->setCurrentBlock("icon");
3346  if (!$objDefinition->isPlugin($this->getIconImageType()))
3347  {
3348  $this->tpl->setVariable("ALT_ICON", $lng->txt("icon")." ".$lng->txt("obj_".$this->getIconImageType()));
3349  }
3350  else
3351  {
3352  include_once("Services/Component/classes/class.ilPlugin.php");
3353  $this->tpl->setVariable("ALT_ICON", $lng->txt("icon")." ".
3354  ilPlugin::lookupTxt("rep_robj", $this->getIconImageType(), "obj_".$this->getIconImageType()));
3355  }
3356 
3357  $this->tpl->setVariable("SRC_ICON",
3358  ilObject::_getIcon($this->obj_id, "small", $this->getIconImageType()));
3359  $this->tpl->parseCurrentBlock();
3360  $cnt += 1;
3361  }
3362 
3363  $this->tpl->touchBlock("d_".$cnt); // indent main div
3364  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
getIconStatus()
Are icons enabled?
getCheckboxStatus()
Are checkboxes enabled?
static lookupTxt($a_mod_prefix, $a_pl_id, $a_lang_var)
Lookup language text.
getCommandId()
get command id Normally the ref id.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getIconImageType()
Returns the icon image type.
global $lng
Definition: privfeed.php:40
getExpandStatus()
Is expand/collapse enabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertInfoScreenCommand()

ilObjectListGUI::insertInfoScreenCommand ( )

insert info screen command

Definition at line 2498 of file class.ilObjectListGUI.php.

References getCommandFrame(), getCommandLink(), ilUtil\getImagePath(), and insertCommand().

Referenced by insertCommands().

2499  {
2500  if ($this->std_cmd_only)
2501  {
2502  return;
2503  }
2504  $cmd_link = $this->getCommandLink("infoScreen");
2505  $cmd_frame = $this->getCommandFrame("infoScreen");
2506  $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame,
2507  ilUtil::getImagePath("cmd_info_s.png"));
2508  }
getCommandLink($a_cmd)
Get command link url.
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
getCommandFrame($a_cmd)
Get command target frame.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertItemDetailLinks()

ilObjectListGUI::insertItemDetailLinks ( )

insert item detail links

public

Parameters

Definition at line 734 of file class.ilObjectListGUI.php.

Referenced by getListItemHTML().

735  {
736  if(!count($this->item_detail_links))
737  {
738  return true;
739  }
740  if(strlen($this->item_detail_links_intro))
741  {
742  $this->tpl->setCurrentBlock('item_detail_intro');
743  $this->tpl->setVariable('ITEM_DETAIL_INTRO_TXT',$this->item_detail_links_intro);
744  $this->tpl->parseCurrentBlock();
745  }
746 
747  foreach($this->item_detail_links as $info)
748  {
749  $this->tpl->setCurrentBlock('item_detail_link');
750  $this->tpl->setVariable('ITEM_DETAIL_LINK_TARGET',$info['target']);
751  $this->tpl->setVariable('ITEM_DETAIL_LINK_DESC',$info['desc']);
752  $this->tpl->setVariable('ITEM_DETAIL_LINK_HREF',$info['link']);
753  $this->tpl->setVariable('ITEM_DETAIL_LINK_NAME',$info['name']);
754  $this->tpl->parseCurrentBlock();
755  }
756  $this->tpl->setCurrentBlock('item_detail_links');
757  $this->tpl->parseCurrentBlock();
758  }
+ Here is the caller graph for this function:

◆ insertLinkCommand()

ilObjectListGUI::insertLinkCommand ( )

insert link command

private

Parameters
object$a_tpltemplate object
int$a_ref_iditem reference id

Definition at line 2241 of file class.ilObjectListGUI.php.

References ilObject\_lookupType(), checkCommandAccess(), getCommandId(), getContainerObject(), ilUtil\getImagePath(), and insertCommand().

Referenced by insertCommands().

2242  {
2243  global $ilAccess;
2244 
2245  if ($this->std_cmd_only)
2246  {
2247  return;
2248  }
2249  // BEGIN PATCH Lucene search
2250 
2251  if(is_object($this->getContainerObject()) and
2253  {
2254  global $objDefinition;
2255 
2256  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type) and
2257  $objDefinition->allowLink(ilObject::_lookupType($this->obj_id)))
2258  {
2259  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2260  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "link");
2261  $this->insertCommand($cmd_link, $this->lng->txt("link"));
2262  $this->adm_commands_included = true;
2263  return true;
2264  }
2265  return false;
2266  }
2267  // END PATCH Lucene Search
2268 
2269  // if the permission is changed here, it has
2270  // also to be changed in ilContainerGUI, admin command check
2271  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type))
2272  {
2273  $this->ctrl->setParameter($this->container_obj, "ref_id",
2274  $this->container_obj->object->getRefId());
2275  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2276  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "link");
2277  $this->insertCommand($cmd_link, $this->lng->txt("link"), "",
2278  ilUtil::getImagePath("cmd_link_s.png"));
2279  $this->adm_commands_included = true;
2280  }
2281  }
getContainerObject()
get container object
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
getCommandId()
get command id Normally the ref id.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupType($a_id, $a_reference=false)
lookup object type
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertMultiDownloadCommand()

ilObjectListGUI::insertMultiDownloadCommand ( )

Definition at line 2903 of file class.ilObjectListGUI.php.

References $_GET, $cmd, ilObject\_lookupType(), getContainerObject(), and insertCommand().

Referenced by insertCommands().

2904  {
2905  global $ilAccess, $objDefinition;
2906 
2907  if ($this->std_cmd_only)
2908  return;
2909 
2910  if(!$objDefinition->isContainer(ilObject::_lookupType($this->obj_id)))
2911  return false;
2912 
2913  if(is_object($this->getContainerObject()) &&
2914  $this->getContainerObject() instanceof ilContainerGUI)
2915  {
2916  $this->ctrl->setParameter($this->getContainerObject(), "type", "");
2917  $this->ctrl->setParameter($this->getContainerObject(), "item_ref_id", "");
2918  $this->ctrl->setParameter($this->getContainerObject(), "active_node", "");
2919  $cmd = $_GET["cmd"] == "enableMultiDownload" ? "render" : "enableMultiDownload";
2920  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), $cmd);
2921  $this->insertCommand($cmd_link, $this->lng->txt("download_multiple_objects"));
2922  return true;
2923  }
2924 
2925  return false;
2926  }
getContainerObject()
get container object
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
static _lookupType($a_id, $a_reference=false)
lookup object type
Class ilContainerGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertNoticeProperties()

ilObjectListGUI::insertNoticeProperties ( )

Definition at line 1870 of file class.ilObjectListGUI.php.

References getNoticeProperties().

Referenced by getListItemHTML().

1871  {
1872  $this->getNoticeProperties();
1873  foreach($this->notice_prop as $property)
1874  {
1875  $this->tpl->setCurrentBlock('notice_item');
1876  $this->tpl->setVariable('NOTICE_ITEM_VALUE',$property['value']);
1877  $this->tpl->parseCurrentBlock();
1878  }
1879  $this->tpl->setCurrentBlock('notice_property');
1880  $this->tpl->parseCurrentBlock();
1881  }
getNoticeProperties()
get notice properties
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPasteCommand()

ilObjectListGUI::insertPasteCommand ( )

Insert paste command.

Definition at line 2386 of file class.ilObjectListGUI.php.

References $_SESSION, ilObject\_lookupType(), getCommandId(), getContainerObject(), and insertCommand().

Referenced by insertCommands().

2387  {
2388  global $ilAccess, $objDefinition;
2389 
2390  if ($this->std_cmd_only)
2391  {
2392  return;
2393  }
2394 
2395  if(!$objDefinition->isContainer(ilObject::_lookupType($this->obj_id)))
2396  {
2397  return false;
2398  }
2399 
2400  if(is_object($this->getContainerObject()) and
2401  $this->getContainerObject() instanceof ilAdministrationCommandHandling and
2402  isset($_SESSION['clipboard']))
2403  {
2404  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2405  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "paste");
2406  $this->insertCommand($cmd_link, $this->lng->txt("paste"));
2407  $this->adm_commands_included = true;
2408  return true;
2409  }
2410  return false;
2411  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
getContainerObject()
get container object
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
getCommandId()
get command id Normally the ref id.
static _lookupType($a_id, $a_reference=false)
lookup object type
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPath()

ilObjectListGUI::insertPath ( )

insert path

Definition at line 3233 of file class.ilObjectListGUI.php.

References $lng, and getPathStatus().

Referenced by getListItemHTML().

3234  {
3235  global $tree, $lng;
3236 
3237  if($this->getPathStatus() != false)
3238  {
3239  include_once 'Services/Tree/classes/class.ilPathGUI.php';
3240  $path_gui = new ilPathGUI();
3241  $path_gui->enableTextOnly(!$this->path_linked);
3242  $path_gui->setUseImages(false);
3243 
3244  $this->tpl->setCurrentBlock("path_item");
3245  $this->tpl->setVariable('PATH_ITEM',$path_gui->getPath(ROOT_FOLDER_ID,$this->ref_id));
3246  $this->tpl->parseCurrentBlock();
3247 
3248  $this->tpl->setCurrentBlock("path");
3249  $this->tpl->setVariable("TXT_LOCATION", $lng->txt("locator"));
3250  $this->tpl->parseCurrentBlock();
3251  return true;
3252  }
3253  }
Creates a path for a start and endnode.
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPayment()

ilObjectListGUI::insertPayment ( )

insert payment information

private

Definition at line 1889 of file class.ilObjectListGUI.php.

References $ilUser, $lng, ilPaymentBookings\_hasAccess(), ilPaymentObject\_hasExtensions(), ilPaymentBookings\_lookupOrder(), ilPaymentObject\_lookupPobjectId(), addCustomProperty(), ilDatePresentation\formatDate(), ilUtil\getImagePath(), IL_CAL_UNIX, and insertPaymentCommand().

Referenced by insertCommands().

1890  {
1891  global $ilAccess,$ilObjDataCache,$ilUser;
1892 
1893  if(IS_PAYMENT_ENABLED && $this->payment_enabled)
1894  {
1895  include_once './Services/Payment/classes/class.ilPaymentObject.php';
1896  include_once './Services/Payment/classes/class.ilPaymentBookings.php';
1897 
1898  if(ilPaymentobject::_requiresPurchaseToAccess($this->ref_id))
1899  {
1900  if(ilPaymentBookings::_hasAccess(ilPaymentObject::_lookupPobjectId($a_ref_id), $ilUser->getId()))
1901  {
1902  // get additional information about order_date and duration
1903 
1904  $order_infos = array();
1906 
1907  if(count($order_infos) > 0)
1908  {
1909  global $lng;
1910  $pay_lang = $lng;
1911  $pay_lang->loadLanguageModule('payment');
1912  $alert = true;
1913  $a_newline = true;
1914  $a_property = $pay_lang->txt('object_purchased_date');
1915  $a_value = ilDatePresentation::formatDate(new ilDateTime($order_infos["order_date"],IL_CAL_UNIX));
1916 
1917  $this->addCustomProperty($a_property, $a_value, $alert, $a_newline);
1918 
1919  $alert = true;
1920  $a_newline = true;
1921  $a_property = $this->lng->txt('object_duration');
1922  if($order_infos['duration'] == 0)
1923  $a_value = $pay_lang->txt('unlimited_duration');
1924  else
1925  $a_value = $order_infos['duration'] .' '.$this->lng->txt('months');
1926  $this->addCustomProperty($a_property, $a_value, $alert, $a_newline);
1927  }
1928 
1929  // check for extension prices
1930  if(ilPaymentObject::_hasExtensions($this->ref_id))
1931  {
1932  $has_extension_prices = true;
1933  $this->insertPaymentCommand($has_extension_prices);
1934  }
1935 
1936  }
1937  else
1938  {
1939  // only relevant and needed for the shop content page
1940 
1941  $this->ctpl = new ilTemplate("tpl.container_list_item_commands.html", true, true,
1942  "Services/Container", "DEFAULT", false, true);
1943  $this->ctpl->setCurrentBlock('payment');
1944  $this->ctpl->setVariable('PAYMENT_TYPE_IMG', ilUtil::getImagePath('icon_pays.png'));
1945  $this->ctpl->setVariable('PAYMENT_ALT_IMG', $this->lng->txt('payment_system') . ': ' . $this->lng->txt('payment_buyable'));
1946  $this->ctpl->parseCurrentBlock();
1947 
1948  $this->insertPaymentCommand();
1949  }
1950  }
1951  }
1952  }
insertPaymentCommand($has_extension_prices=false)
static _lookupPobjectId($a_ref_id)
const IL_CAL_UNIX
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
static _lookupOrder($a_pobject_id)
static _hasAccess($a_pobject_id, $a_user_id=0, $a_transaction=0)
addCustomProperty($a_property="", $a_value="", $a_alert=false, $a_newline=false)
add custom property
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
static _hasExtensions($a_ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPaymentCommand()

ilObjectListGUI::insertPaymentCommand (   $has_extension_prices = false)
protected

Definition at line 1954 of file class.ilObjectListGUI.php.

References $type, createDefaultCommand(), and getCommands().

Referenced by insertPayment().

1955  {
1956  $commands = $this->getCommands($this->ref_id, $this->obj_id);
1957  foreach($commands as $command)
1958  {
1959  if($command['default'] === true)
1960  {
1961  $command = $this->createDefaultCommand($command);
1962 // if(is_null($command['link']) )
1963 // {
1964  switch($this->type)
1965  {
1966  case 'sahs':
1967  $command['link'] = 'ilias.php?baseClass=ilSAHSPresentationGUI&ref_id='.$this->ref_id;
1968  break;
1969 
1970  case 'lm':
1971  $command['link'] = 'ilias.php?baseClass=ilLMPresentationGUI&ref_id='.$this->ref_id;
1972  break;
1973  case 'exc':
1974  default:
1975  $command['link'] = 'ilias.php?baseClass=ilShopController&cmdClass=ilshoppurchasegui&ref_id='.$this->ref_id;
1976  break;
1977  }
1978 // }
1979 
1980  $type = $this->type;
1981  if(strpos($command['link'], '_'.$type.'_') !== false)
1982  {
1983  $demo_link = str_replace('_'.$type.'_', '_'.$type.'purchasetypedemo_', $command['link']);
1984  $buy_link = str_replace('_'.$type.'_', '_'.$type.'purchasetypebuy_', $command['link']);
1985  }
1986  else
1987  {
1988  $demo_link = $command['link'].(strpos($command['link'], '?') === false ? '?' : '&').'purchasetype=demo';
1989  $buy_link = $command['link'].(strpos($command['link'], '?') === false ? '?' : '&').'purchasetype=buy';
1990  }
1991 
1992  $this->current_selection_list->addItem($this->lng->txt('payment_demo'), "", $demo_link, $a_img, $this->lng->txt('payment_demo'), $command['frame']);
1993  if($has_extension_prices == true)
1994  {
1995  $this->current_selection_list->addItem($this->lng->txt('buy_extension'), "", $buy_link, $a_img, $this->lng->txt('buy_extension'), $command['frame']);
1996  }
1997  else
1998  $this->current_selection_list->addItem($this->lng->txt('buy'), "", $buy_link, $a_img, $this->lng->txt('buy'), $command['frame']);
1999 
2000  }
2001  }
2002  }
getCommands()
get all current commands for a specific ref id (in the permission context of the current user) ...
createDefaultCommand($command)
Get default command link Overwritten for e.g categories,courses => they return a goto link If search ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPositionField()

ilObjectListGUI::insertPositionField ( )

Insert field for positioning.

Definition at line 3382 of file class.ilObjectListGUI.php.

Referenced by getListItemHTML().

3383  {
3384  if ($this->position_enabled)
3385  {
3386  $this->tpl->setCurrentBlock("position");
3387  $this->tpl->setVariable("POS_ID", $this->position_field_index);
3388  $this->tpl->setVariable("POS_VAL", $this->position_value);
3389  $this->tpl->parseCurrentBlock();
3390  }
3391  }
+ Here is the caller graph for this function:

◆ insertPreconditions()

ilObjectListGUI::insertPreconditions ( )

insert all missing preconditions

Definition at line 2114 of file class.ilObjectListGUI.php.

References $lng, ilConditionHandler\_getConditionsOfTarget(), ilObject\_lookupTitle(), getUniqueItemId(), parseConditions(), and ilUtil\sortArray().

Referenced by getListItemHTML().

2115  {
2116  global $ilAccess, $lng, $objDefinition,$tree;
2117 
2118  include_once("./Services/AccessControl/classes/class.ilConditionHandler.php");
2119 
2120  $missing_cond_exist = false;
2121 
2122  // do not show multi level conditions (messes up layout)
2123  if ($this->condition_depth > 0)
2124  {
2125  return;
2126  }
2127 
2128  // Sort by title
2129  /*
2130  foreach(ilConditionHandler::_getConditionsOfTarget($this->ref_id, $this->obj_id) as $condition)
2131  {
2132  $condition['title'] = ilObject::_lookupTitle($condition['trigger_obj_id']);
2133  }
2134  */
2135 
2136  $conditions = ilConditionHandler::_getConditionsOfTarget($this->ref_id, $this->obj_id);
2137  if(sizeof($conditions))
2138  {
2139  for($i = 0; $i < count($conditions); $i++)
2140  {
2141  $conditions[$i]['title'] = ilObject::_lookupTitle($conditions[$i]['trigger_obj_id']);
2142  }
2143  $conditions = ilUtil::sortArray($conditions,'title','DESC');
2144 
2145  $div_id = $this->getUniqueItemId();
2146 
2147  // Show obligatory and optional preconditions seperated
2148  $all_done_obl = $this->parseConditions($div_id,$conditions,true);
2149  $all_done_opt = $this->parseConditions($div_id,$conditions,false);
2150 
2151  if(!$all_done_obl || !$all_done_opt)
2152  {
2153  $this->tpl->setCurrentBlock("preconditions_toggle");
2154  $this->tpl->setVariable("PRECONDITION_TOGGLE_INTRO", $this->lng->txt("precondition_toggle"));
2155  $this->tpl->setVariable("PRECONDITION_TOGGLE_TRIGGER", $this->lng->txt("show"));
2156  $this->tpl->setVariable("PRECONDITION_TOGGLE_ID", $div_id);
2157  $this->tpl->setVariable("TXT_PRECONDITION_SHOW", $this->lng->txt("show"));
2158  $this->tpl->setVariable("TXT_PRECONDITION_HIDE", $this->lng->txt("hide"));
2159  $this->tpl->parseCurrentBlock();
2160  }
2161  }
2162  }
parseConditions($toggle_id, $conditions, $obligatory=true)
static _getConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_target_type="")
get all conditions of target object
static _lookupTitle($a_id)
lookup object title
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertProgressInfo()

ilObjectListGUI::insertProgressInfo ( )

insert progress info

public

Returns

Definition at line 3261 of file class.ilObjectListGUI.php.

Referenced by getListItemHTML().

3262  {
3263  return true;
3264  }
+ Here is the caller graph for this function:

◆ insertProperties()

ilObjectListGUI::insertProperties (   $a_item = '')

insert properties

private

Definition at line 1725 of file class.ilObjectListGUI.php.

References $ilUser, $lng, $obj_id, $ref_id, $reference_ref_id, getCustomProperties(), ilNoteGUI\getListCommentsJSCall(), ilLPStatus\getListGUIStatus(), ilNoteGUI\getListNotesJSCall(), ilTaggingGUI\getListTagsJSCall(), getProperties(), IL_NOTE_PRIVATE, IL_NOTE_PUBLIC, and isCommentsActivated().

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), and getListItemHTML().

1726  {
1727  global $ilAccess, $lng, $ilUser;
1728 
1729  $props = $this->getProperties($a_item);
1730  $props = $this->getCustomProperties($props);
1731 
1732  if($this->context != self::CONTEXT_WORKSPACE && $this->context != self::CONTEXT_WORKSPACE_SHARING)
1733  {
1734  // add learning progress custom property
1735  include_once "Services/Tracking/classes/class.ilLPStatus.php";
1736  $lp = ilLPStatus::getListGUIStatus($this->obj_id);
1737  if($lp)
1738  {
1739  $props[] = array("alert" => false,
1740  "property" => $lng->txt("learning_progress"),
1741  "value" => $lp,
1742  "newline" => true);
1743  }
1744 
1745  // add no item access note in public section
1746  // for items that are visible but not readable
1747  if ($this->ilias->account->getId() == ANONYMOUS_USER_ID)
1748  {
1749  if (!$ilAccess->checkAccess("read", "", $this->ref_id, $this->type, $this->obj_id))
1750  {
1751  $props[] = array("alert" => true,
1752  "value" => $lng->txt("no_access_item_public"),
1753  "newline" => true);
1754  }
1755  }
1756  }
1757 
1758  // reference objects have translated ids, revert to originals
1759  $note_ref_id = $this->ref_id;
1760  $note_obj_id = $this->obj_id;
1761  if($this->reference_ref_id)
1762  {
1763  $note_ref_id = $this->reference_ref_id;
1764  $note_obj_id = $this->reference_obj_id;
1765  }
1766 
1767  $redraw_js = "il.Object.redrawListItem(".$note_ref_id.");";
1768 
1769  // add common properties (comments, notes, tags)
1770  if ((self::$cnt_notes[$note_obj_id][IL_NOTE_PRIVATE] > 0 ||
1771  self::$cnt_notes[$note_obj_id][IL_NOTE_PUBLIC] > 0 ||
1772  self::$cnt_tags[$note_obj_id] > 0) &&
1773  ($ilUser->getId() != ANONYMOUS_USER_ID))
1774  {
1775  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
1776  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
1777 
1778  $nl = true;
1779  if ($this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, false, false)
1780  && self::$cnt_notes[$note_obj_id][IL_NOTE_PUBLIC] > 0)
1781  {
1782  $props[] = array("alert" => false,
1783  "property" => $lng->txt("notes_comments"),
1784  "value" => "<a href='#' onclick=\"return ".
1785  ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $redraw_js)."\">".
1786  self::$cnt_notes[$note_obj_id][IL_NOTE_PUBLIC]."</a>",
1787  "newline" => $nl);
1788  $nl = false;
1789  }
1790 
1791  if ($this->notes_enabled && self::$cnt_notes[$note_obj_id][IL_NOTE_PRIVATE] > 0)
1792  {
1793  $props[] = array("alert" => false,
1794  "property" => $lng->txt("notes"),
1795  "value" => "<a href='#' onclick=\"return ".
1796  ilNoteGUI::getListNotesJSCall($this->ajax_hash, $redraw_js)."\">".
1797  self::$cnt_notes[$note_obj_id][IL_NOTE_PRIVATE]."</a>",
1798  "newline" => $nl);
1799  $nl = false;
1800  }
1801  if ($this->tags_enabled && self::$cnt_tags[$note_obj_id] > 0)
1802  {
1803  $tags_set = new ilSetting("tags");
1804  if ($tags_set->get("enable"))
1805  {
1806  $props[] = array("alert" => false,
1807  "property" => $lng->txt("tagging_tags"),
1808  "value" => "<a href='#' onclick=\"return ".
1809  ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $redraw_js)."\">".
1810  self::$cnt_tags[$note_obj_id]."</a>",
1811  "newline" => $nl);
1812  $nl = false;
1813  }
1814  }
1815  }
1816 
1817  $cnt = 1;
1818  if (is_array($props) && count($props) > 0)
1819  {
1820  foreach($props as $prop)
1821  {
1822  // BEGIN WebDAV: Display a separator between properties.
1823  if ($cnt > 1)
1824  {
1825  $this->tpl->touchBlock("separator_prop");
1826  }
1827  // END WebDAV: Display a separator between properties.
1828 
1829  if ($prop["alert"] == true)
1830  {
1831  $this->tpl->touchBlock("alert_prop");
1832  }
1833  else
1834  {
1835  $this->tpl->touchBlock("std_prop");
1836  }
1837  if ($prop["newline"] == true && $cnt > 1)
1838  {
1839  $this->tpl->touchBlock("newline_prop");
1840  }
1841  //BEGIN WebDAV: Support hidden property names.
1842  if (isset($prop["property"]) && $prop['propertyNameVisible'] !== false)
1843  //END WebDAV: Support hidden property names.
1844  {
1845  $this->tpl->setCurrentBlock("prop_name");
1846  $this->tpl->setVariable("TXT_PROP", $prop["property"]);
1847  $this->tpl->parseCurrentBlock();
1848  }
1849  $this->tpl->setCurrentBlock("item_property");
1850  //BEGIN WebDAV: Support links in property values.
1851  if ($prop['link'])
1852  {
1853  $this->tpl->setVariable("LINK_PROP", $prop['link']);
1854  $this->tpl->setVariable("LINK_VAL_PROP", $prop["value"]);
1855  }
1856  else
1857  {
1858  $this->tpl->setVariable("VAL_PROP", $prop["value"]);
1859  }
1860  //END WebDAV: Support links in property values.
1861  $this->tpl->parseCurrentBlock();
1862 
1863  $cnt++;
1864  }
1865  $this->tpl->setCurrentBlock("item_properties");
1866  $this->tpl->parseCurrentBlock();
1867  }
1868  }
ILIAS Setting Class.
getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
const IL_NOTE_PRIVATE
Definition: class.ilNote.php:4
static getListGUIStatus($a_obj_id)
getListTagsJSCall($a_hash, $a_update_code=null)
Get tagging js call.
const IL_NOTE_PUBLIC
Definition: class.ilNote.php:5
getProperties($a_item='')
Get item properties.
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
isCommentsActivated($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access=true)
Check comments status against comments settings and context.
global $lng
Definition: privfeed.php:40
getCustomProperties($a_prop)
get custom properties
getListNotesJSCall($a_hash, $a_update_code=null)
Get list notes js call.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertRelevance()

ilObjectListGUI::insertRelevance ( )

insert relevance

Parameters

Definition at line 1650 of file class.ilObjectListGUI.php.

References $lng, enabledRelevance(), ilUtil\getImagePath(), and getRelevance().

Referenced by getListItemHTML().

1651  {
1652  global $lng;
1653 
1654  if(!$this->enabledRelevance() or !(int) $this->getRelevance())
1655  {
1656  return false;
1657  }
1658 
1659  $width1 = (int) $this->getRelevance();
1660  $width2 = (int) (100 - $width1);
1661 
1662  $this->tpl->setCurrentBlock('relevance');
1663  #$this->tpl->setVariable('TXT_RELEVANCE',$lng->txt('search_relevance'));
1664  $this->tpl->setVariable('VAL_REL',sprintf("%.02f %%",$this->getRelevance()));
1665  $this->tpl->setVariable('WIDTH_A',$width1);
1666  $this->tpl->setVariable('WIDTH_B',$width2);
1667  $this->tpl->setVariable('IMG_A',ilUtil::getImagePath("relevance_blue.png"));
1668  $this->tpl->setVariable('IMG_B',ilUtil::getImagePath("relevance_dark.png"));
1669  $this->tpl->parseCurrentBlock();
1670 
1671  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
enabledRelevance()
enabled relevance
getRelevance()
get relevance
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertSearchFragment()

ilObjectListGUI::insertSearchFragment ( )

Insert highlighted search fragment.

Returns

Definition at line 1635 of file class.ilObjectListGUI.php.

References getSearchFragment().

Referenced by getListItemHTML().

1636  {
1637  if(strlen($this->getSearchFragment()))
1638  {
1639  $this->tpl->setCurrentBlock('search_fragment');
1640  $this->tpl->setVariable('TXT_SEARCH_FRAGMENT',$this->getSearchFragment().' ...');
1641  $this->tpl->parseCurrentBlock();
1642  }
1643  }
getSearchFragment()
get search fragment
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertSubItems()

ilObjectListGUI::insertSubItems ( )

Insert subitems.

Definition at line 3369 of file class.ilObjectListGUI.php.

Referenced by ilCourseObjectiveListGUI\getListItemHTML(), and getListItemHTML().

3370  {
3371  foreach ($this->sub_item_html as $sub_html)
3372  {
3373  $this->tpl->setCurrentBlock("subitem");
3374  $this->tpl->setVariable("SUBITEM", $sub_html);
3375  $this->tpl->parseCurrentBlock();
3376  }
3377  }
+ Here is the caller graph for this function:

◆ insertSubscribeCommand()

ilObjectListGUI::insertSubscribeCommand ( )

insert subscribe command

private

Parameters
object$a_tpltemplate object
int$a_ref_iditem reference id

Definition at line 2420 of file class.ilObjectListGUI.php.

References $ilSetting, $ilUser, $type, ilObject\_lookupObjId(), ilObject\_lookupType(), checkCommandAccess(), getCommandId(), getContainerObject(), ilUtil\getImagePath(), and insertCommand().

Referenced by insertCommands().

2421  {
2422  global $ilSetting, $ilUser;
2423 
2424  if ($this->std_cmd_only)
2425  {
2426  return;
2427  }
2428 
2429  if((int)$ilSetting->get('disable_my_offers'))
2430  {
2431  return;
2432  }
2433 
2435 
2436  if ($ilUser->getId() != ANONYMOUS_USER_ID)
2437  {
2438  // BEGIN WebDAV: Lock/Unlock objects
2439  /* This code section is temporarily commented out.
2440  I will reactivate it at a later point, when I get the
2441  the backend working properly. - Werner Randelshofer 2008-04-17
2442  if (is_object($this->container_obj) && $this->rbacsystem->checkAccess("write", $this->ref_id))
2443  {
2444  require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
2445  if (ilDAVServer::_isActive() && ilDAVServer::_isActionsVisible())
2446  {
2447  $this->ctrl->setParameter($this->container_obj, "ref_id",
2448  $this->container_obj->object->getRefId());
2449  $this->ctrl->setParameter($this->container_obj, "type", $this->type);
2450  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->ref_id);
2451  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "lock");
2452  $this->insertCommand($cmd_link, $this->lng->txt("lock"));
2453 
2454  $this->ctrl->setParameter($this->container_obj, "ref_id",
2455  $this->container_obj->object->getRefId());
2456  $this->ctrl->setParameter($this->container_obj, "type", $this->type);
2457  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->ref_id);
2458  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "unlock");
2459  $this->insertCommand($cmd_link, $this->lng->txt("unlock"));
2460  }
2461  }
2462  */
2463  // END WebDAV: Lock/Unlock objects
2464 
2465  if (!$ilUser->isDesktopItem($this->getCommandId(), $type))
2466  {
2467  // Pass type and object ID to ilAccess to improve performance
2468  global $ilAccess;
2469  if ($this->checkCommandAccess("read", "", $this->ref_id, $this->type, $this->obj_id))
2470  {
2471  if($this->getContainerObject() instanceof ilDesktopItemHandling)
2472  {
2473  $this->ctrl->setParameter($this->container_obj, "type", $type);
2474  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2475  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "addToDesk");
2476  $this->insertCommand($cmd_link, $this->lng->txt("to_desktop"), "",
2477  ilUtil::getImagePath("cmd_pd_put_s.png"));
2478  }
2479  }
2480  }
2481  else
2482  {
2483  if ($this->getContainerObject() instanceof ilDesktopItemHandling)
2484  {
2485  $this->ctrl->setParameter($this->container_obj, "type", $type);
2486  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2487  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "removeFromDesk");
2488  $this->insertCommand($cmd_link, $this->lng->txt("unsubscribe"), "",
2489  ilUtil::getImagePath("cmd_pd_rem_s.png"));
2490  }
2491  }
2492  }
2493  }
getContainerObject()
get container object
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
getCommandId()
get command id Normally the ref id.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilUser
Definition: imgupload.php:15
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertSubstitutions()

ilObjectListGUI::insertSubstitutions ( )

Insert substitutions.

public

Definition at line 1575 of file class.ilObjectListGUI.php.

References $data.

Referenced by insertDescription().

1576  {
1577  $fields_shown = false;
1578  foreach($this->substitutions->getParsedSubstitutions($this->ref_id,$this->obj_id) as $data)
1579  {
1580  if($data['bold'])
1581  {
1582  $data['name'] = '<strong>'.$data['name'].'</strong>';
1583  $data['value'] = '<strong>'.$data['value'].'</strong>';
1584  }
1585  $this->tpl->touchBlock("std_prop");
1586  $this->tpl->setCurrentBlock('item_property');
1587  if($data['show_field'])
1588  {
1589  $this->tpl->setVariable('TXT_PROP',$data['name']);
1590  }
1591  $this->tpl->setVariable('VAL_PROP',$data['value']);
1592  $this->tpl->parseCurrentBlock();
1593 
1594  if($data['newline'])
1595  {
1596  $this->tpl->touchBlock('newline_prop');
1597  }
1598  $fields_shown = false;
1599 
1600  }
1601  if($fields_shown)
1602  {
1603  $this->tpl->touchBlock('newline_prop');
1604  }
1605  }
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
+ Here is the caller graph for this function:

◆ insertTimingsCommand()

ilObjectListGUI::insertTimingsCommand ( )

insert edit timings command

protected

Definition at line 2570 of file class.ilObjectListGUI.php.

References $parent_ref_id, checkCommandAccess(), and insertCommand().

Referenced by insertCommands().

2571  {
2572  if ($this->std_cmd_only || !$this->container_obj->object)
2573  {
2574  return;
2575  }
2576 
2577  $parent_ref_id = $this->container_obj->object->getRefId();
2578  $parent_type = $this->container_obj->object->getType();
2579 
2580  if($this->checkCommandAccess('write','',$parent_ref_id,$parent_type) ||
2581  $this->checkCommandAccess('write','',$this->ref_id,$this->type))
2582  {
2583  $this->ctrl->setParameterByClass('ilobjectactivationgui','cadh',
2584  $this->ajax_hash);
2585  $this->ctrl->setParameterByClass('ilobjectactivationgui','parent_id',
2586  $parent_ref_id);
2587  $cmd_lnk = $this->ctrl->getLinkTargetByClass(array($this->gui_class_name, 'ilcommonactiondispatchergui', 'ilobjectactivationgui'),
2588  'edit');
2589 
2590  $this->insertCommand($cmd_lnk, $this->lng->txt('obj_activation_list_gui'));
2591  }
2592  }
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertTitle()

ilObjectListGUI::insertTitle ( )

insert item title

private

Parameters
object$a_tpltemplate object
string$a_titleitem title

Definition at line 1464 of file class.ilObjectListGUI.php.

References $preview, appendRepositoryFrameParameter(), buildGotoLink(), ilPreviewGUI\CONTEXT_REPOSITORY, ilPreviewGUI\CONTEXT_WORKSPACE, getCommandsStatus(), ilUtil\getImagePath(), getTitle(), ilPreview\hasPreview(), ilPreview\lookupRenderStatus(), modifySAHSlaunch(), and ilPreview\RENDER_STATUS_NONE.

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), and getListItemHTML().

1465  {
1466  if($this->restrict_to_goto)
1467  {
1468  $this->default_command = array("frame" => "",
1469  "link" => $this->buildGotoLink());
1470  }
1471 
1472  if (!$this->default_command || (!$this->getCommandsStatus() && !$this->restrict_to_goto))
1473  {
1474  $this->tpl->setCurrentBlock("item_title");
1475  $this->tpl->setVariable("TXT_TITLE", $this->getTitle());
1476  $this->tpl->parseCurrentBlock();
1477  }
1478  else
1479  {
1480  $this->default_command["link"] =
1481  $this->modifySAHSlaunch($this->default_command["link"],$this->default_command["frame"]);
1482 
1483  if ($this->default_command["frame"] != "")
1484  {
1485  $this->tpl->setCurrentBlock("title_linked_frame");
1486  $this->tpl->setVariable("TARGET_TITLE_LINKED", $this->default_command["frame"]);
1487  $this->tpl->parseCurrentBlock();
1488  }
1489 
1490  // workaround for repository frameset
1491  #var_dump("<pre>",$this->default_command['link'],"</pre>");
1492  $this->default_command["link"] =
1493  $this->appendRepositoryFrameParameter($this->default_command["link"]);
1494 
1495  #var_dump("<pre>",$this->default_command['link'],"</pre>");
1496 
1497 
1498  // the default command is linked with the title
1499  $this->tpl->setCurrentBlock("item_title_linked");
1500  $this->tpl->setVariable("TXT_TITLE_LINKED", $this->getTitle());
1501  $this->tpl->setVariable("HREF_TITLE_LINKED", $this->default_command["link"]);
1502 
1503  // has preview?
1504  include_once("./Services/Preview/classes/class.ilPreview.php");
1505  if (ilPreview::hasPreview($this->obj_id, $this->type))
1506  {
1507  include_once("./Services/Preview/classes/class.ilPreviewGUI.php");
1508 
1509  // get context for access checks later on
1510  $access_handler = null;
1511  $context;
1512  switch ($this->context)
1513  {
1514  case self::CONTEXT_WORKSPACE:
1515  case self::CONTEXT_WORKSPACE_SHARING:
1517  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
1518  $access_handler = new ilWorkspaceAccessHandler();
1519  break;
1520 
1521  default:
1522  global $ilAccess;
1524  $access_handler = $ilAccess;
1525  break;
1526  }
1527 
1528  $preview = new ilPreviewGUI($this->ref_id, $context, $this->obj_id, $access_handler);
1529  $preview_status = ilPreview::lookupRenderStatus($this->obj_id);
1530  $preview_status_class = "";
1531  $preview_text_topic = "preview_show";
1532  if ($preview_status == ilPreview::RENDER_STATUS_NONE)
1533  {
1534  $preview_status_class = "ilPreviewStatusNone";
1535  $preview_text_topic = "preview_none";
1536  }
1537  $this->tpl->setCurrentBlock("item_title_linked");
1538  $this->tpl->setVariable("PREVIEW_STATUS_CLASS", $preview_status_class);
1539  $this->tpl->setVariable("SRC_PREVIEW_ICON", ilUtil::getImagePath("preview.png", "Services/Preview"));
1540  $this->tpl->setVariable("TXT_PREVIEW", $this->lng->txt($preview_text_topic));
1541  $this->tpl->setVariable("SCRIPT_PREVIEW_CLICK", $preview->getJSCall($this->getUniqueItemId(true)));
1542  $this->tpl->parseCurrentBlock();
1543  }
1544 
1545  $this->tpl->parseCurrentBlock();
1546  }
1547 
1548  if ($this->bold_title == true)
1549  {
1550  $this->tpl->touchBlock('bold_title_start');
1551  $this->tpl->touchBlock('bold_title_end');
1552  }
1553  }
Access handler for personal workspace.
const RENDER_STATUS_NONE
static lookupRenderStatus($a_obj_id)
Gets the render status for the object with the specified id.
modifySAHSlaunch($a_link, $wtarget)
workaround: SAHS in new javavasript-created window or iframe
static hasPreview($a_obj_id, $a_type="")
Determines whether the object with the specified reference id has a preview.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$preview
appendRepositoryFrameParameter($a_link)
workaround: all links into the repository (from outside) must tell repository to setup the frameset ...
getTitle()
getTitle overwritten in class.ilObjLinkResourceList.php
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCommentsActivated()

ilObjectListGUI::isCommentsActivated (   $a_type,
  $a_ref_id,
  $a_obj_id,
  $a_header_actions,
  $a_check_write_access = true 
)
protected

Check comments status against comments settings and context.

Parameters
string$a_type
int$a_ref_id
int$a_obj_id
bool$a_header_actions
bool$a_check_write_access
Returns
bool

Definition at line 3731 of file class.ilObjectListGUI.php.

References checkCommandAccess(), and ilNote\commentsActivated().

Referenced by getHeaderAction(), insertCommonSocialCommands(), and insertProperties().

3732  {
3733  if($this->comments_enabled)
3734  {
3735  if(!$this->comments_settings_enabled)
3736  {
3737  return true;
3738  }
3739  if($a_check_write_access && $this->checkCommandAccess('write','', $a_ref_id, $a_type))
3740  {
3741  return true;
3742  }
3743  // fallback to single object check if no preloaded data
3744  // only the repository does preloadCommonProperties() yet
3745  if(!$a_header_actions && self::$preload_done)
3746  {
3747  if(self::$comments_activation[$a_obj_id][$a_type])
3748  {
3749  return true;
3750  }
3751  }
3752  else
3753  {
3754  include_once("./Services/Notes/classes/class.ilNote.php");
3755  if(ilNote::commentsActivated($a_obj_id, 0, $a_type))
3756  {
3757  return true;
3758  }
3759  }
3760  }
3761  return false;
3762  }
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type)
Are comments activated for object?
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isExpanded()

ilObjectListGUI::isExpanded ( )

Definition at line 422 of file class.ilObjectListGUI.php.

References $is_expanded.

Referenced by insertIconsAndCheckboxes().

423  {
424  return $this->is_expanded;
425  }
+ Here is the caller graph for this function:

◆ isFileUploadAllowed()

ilObjectListGUI::isFileUploadAllowed ( )

Gets a value indicating whether file uploads to this object are allowed or not.

Returns
bool true, if file upload is allowed; otherwise, false.

Definition at line 3781 of file class.ilObjectListGUI.php.

References ilFileUploadUtil\isUploadAllowed().

Referenced by getListItemHTML().

3782  {
3783  // check if file upload allowed
3784  include_once("./Services/FileUpload/classes/class.ilFileUploadUtil.php");
3785  return ilFileUploadUtil::isUploadAllowed($this->ref_id, $this->type);
3786  }
static isUploadAllowed($a_ref_id, $a_type="")
Determines whether files can be uploaded to the object with the specified reference id...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isMode()

ilObjectListGUI::isMode (   $a_mode)

check current output mode

Parameters
string$a_mode(IL_LIST_FULL | IL_LIST_AS_TRIGGER)
Returns
boolen true if current mode is $a_mode

Definition at line 1708 of file class.ilObjectListGUI.php.

Referenced by ilObjiLincClassroomListGUI\getListItemHTML(), getListItemHTML(), and insertCommands().

1709  {
1710  if ($a_mode == $this->mode)
1711  {
1712  return true;
1713  }
1714  else
1715  {
1716  return false;
1717  }
1718  }
+ Here is the caller graph for this function:

◆ isSideBlock()

ilObjectListGUI::isSideBlock ( )

Returns whether current item is a block in a side column or not.

Definition at line 3668 of file class.ilObjectListGUI.php.

3669  {
3670  return false;
3671  }

◆ isTitleBold()

ilObjectListGUI::isTitleBold ( )

public

Returns
boolean returns if the item title is bold or not

Definition at line 3689 of file class.ilObjectListGUI.php.

References $bold_title.

3690  {
3691  return $this->bold_title;
3692  }

◆ isVisibleOnlyForced()

ilObjectListGUI::isVisibleOnlyForced ( )

Force unreadable.

Returns
type

Definition at line 1343 of file class.ilObjectListGUI.php.

References $force_visible_only.

Referenced by checkCommandAccess().

1344  {
1346  }
+ Here is the caller graph for this function:

◆ modifySAHSlaunch()

ilObjectListGUI::modifySAHSlaunch (   $a_link,
  $wtarget 
)

workaround: SAHS in new javavasript-created window or iframe

Definition at line 3212 of file class.ilObjectListGUI.php.

References ilBrowser\isMobile().

Referenced by insertTitle().

3213  {
3214  if (strstr($a_link, 'ilSAHSPresentationGUI') && !$this->offline_mode)
3215  {
3216  include_once 'Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
3217  $sahs_obj = new ilObjSAHSLearningModule($this->ref_id);
3218  $om = $sahs_obj->getOpenMode();
3219  $width = $sahs_obj->getWidth();
3220  $height = $sahs_obj->getHeight();
3221  if ($om != 0 && !ilBrowser::isMobile())
3222  {
3223  $this->default_command["frame"]="";
3224  $a_link = "javascript:void(0); onclick=startSAHS('".$a_link."','".$wtarget."',".$om.",".$width.",".$height.");";
3225  }
3226  }
3227  return $a_link;
3228  }
isMobile()
isMobile
Class ilObjSCORMLearningModule.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseConditions()

ilObjectListGUI::parseConditions (   $toggle_id,
  $conditions,
  $obligatory = true 
)
protected

Definition at line 2004 of file class.ilObjectListGUI.php.

References $lng, $location, $ok, ilConditionHandler\_checkCondition(), ilObject\_lookupTitle(), ilConditionHandler\calculateRequiredTriggers(), ilMemberViewSettings\getInstance(), ilConditionHandler\getOptionalConditionsOfTarget(), getUniqueItemId(), and IL_LIST_AS_TRIGGER.

Referenced by insertPreconditions().

2005  {
2006  global $ilAccess, $lng, $objDefinition,$tree;
2007 
2008  $num_required = ilConditionHandler::calculateRequiredTriggers($this->ref_id, $this->obj_id);
2009  $num_optional_required =
2010  $num_required - count($conditions) + count(ilConditionHandler::getOptionalConditionsOfTarget($this->ref_id, $this->obj_id));
2011 
2012  // Check if all conditions are fullfilled
2013  $visible_conditions = array();
2014  $passed_optional = 0;
2015  foreach($conditions as $condition)
2016  {
2017  if($obligatory and !$condition['obligatory'])
2018  {
2019  continue;
2020  }
2021  if(!$obligatory and $condition['obligatory'])
2022  {
2023  continue;
2024  }
2025 
2026  if($tree->isDeleted($condition['trigger_ref_id']))
2027  {
2028  continue;
2029  }
2030 
2031  include_once 'Services/Container/classes/class.ilMemberViewSettings.php';
2032  $ok = ilConditionHandler::_checkCondition($condition['id']) and
2033  !ilMemberViewSettings::getInstance()->isActive();
2034 
2035  if(!$ok)
2036  {
2037  $visible_conditions[] = $condition['id'];
2038  }
2039 
2040  if(!$obligatory and $ok)
2041  {
2042  ++$passed_optional;
2043  // optional passed
2044  if($passed_optional >= $num_optional_required)
2045  {
2046  return true;
2047  }
2048  }
2049  }
2050 
2051  foreach($conditions as $condition)
2052  {
2053  if(!in_array($condition['id'], $visible_conditions))
2054  {
2055  continue;
2056  }
2057 
2058  $cond_txt = $lng->txt("condition_".$condition["operator"])." ".
2059  $condition["value"];
2060 
2061  // display trigger item
2062  $class = $objDefinition->getClassName($condition["trigger_type"]);
2063  $location = $objDefinition->getLocation($condition["trigger_type"]);
2064  if ($class == "" && $location == "")
2065  {
2066  continue;
2067  }
2068  $missing_cond_exist = true;
2069 
2070  $full_class = "ilObj".$class."ListGUI";
2071  include_once($location."/class.".$full_class.".php");
2072  $item_list_gui = new $full_class($this);
2073  $item_list_gui->setMode(IL_LIST_AS_TRIGGER);
2074  $item_list_gui->enablePath(false);
2075  $item_list_gui->enableIcon(true);
2076  $item_list_gui->setConditionDepth($this->condition_depth + 1);
2077  $item_list_gui->setParentRefId($this->getUniqueItemId()); // yes we can
2078  $item_list_gui->addCustomProperty($this->lng->txt("precondition_required_itemlist"), $cond_txt, false, true);
2079  $trigger_html = $item_list_gui->getListItemHTML($condition['trigger_ref_id'],
2080  $condition['trigger_obj_id'], ilObject::_lookupTitle($condition["trigger_obj_id"]),
2081  "");
2082  $this->tpl->setCurrentBlock("precondition");
2083  if ($trigger_html == "")
2084  {
2085  $trigger_html = $this->lng->txt("precondition_not_accessible");
2086  }
2087  $this->tpl->setVariable("TXT_CONDITION", trim($cond_txt));
2088  $this->tpl->setVariable("TRIGGER_ITEM", $trigger_html);
2089  $this->tpl->parseCurrentBlock();
2090  }
2091 
2092  if ($missing_cond_exist and $obligatory)
2093  {
2094  $this->tpl->setCurrentBlock("preconditions");
2095  $this->tpl->setVariable("CONDITION_TOGGLE_ID", "_obl_".$toggle_id);
2096  $this->tpl->setVariable("TXT_PRECONDITIONS", $lng->txt("preconditions_obligatory_hint"));
2097  $this->tpl->parseCurrentBlock();
2098 
2099  }
2100  elseif($missing_cond_exist and !$obligatory)
2101  {
2102  $this->tpl->setCurrentBlock("preconditions");
2103  $this->tpl->setVariable("CONDITION_TOGGLE_ID", "_opt_".$toggle_id);
2104  $this->tpl->setVariable("TXT_PRECONDITIONS", sprintf($lng->txt("preconditions_optional_hint"),$num_optional_required));
2105  $this->tpl->parseCurrentBlock();
2106  }
2107 
2108  return !$missing_cond_exist;
2109  }
const IL_LIST_AS_TRIGGER
$location
Definition: buildRTE.php:44
static _lookupTitle($a_id)
lookup object title
static calculateRequiredTriggers($a_target_ref_id, $a_target_obj_id, $a_target_obj_type='', $a_force_update=false)
calculate number of obligatory items
static getOptionalConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_obj_type='')
Get optional conditions.
_checkCondition($a_id, $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...
static getInstance()
Get instance.
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ preloadCommonProperties()

static ilObjectListGUI::preloadCommonProperties (   $a_obj_ids,
  $a_context 
)
static

Preload common properties.

Parameters

Definition at line 3700 of file class.ilObjectListGUI.php.

References $lng, ilNote\_countNotesAndCommentsMultiple(), ilTagging\_countTags(), and ilNote\getRepObjActivation().

Referenced by ilObjectListGUIPreloader\preload().

3701  {
3702  global $lng;
3703 
3704  if($a_context == self::CONTEXT_REPOSITORY)
3705  {
3706  $lng->loadLanguageModule("notes");
3707  $lng->loadLanguageModule("tagging");
3708  $lng->loadLanguageModule("rating");
3709 
3710  include_once("./Services/Tagging/classes/class.ilTagging.php");
3711  self::$cnt_tags = ilTagging::_countTags($a_obj_ids);
3712 
3713  include_once("./Services/Notes/classes/class.ilNote.php");
3714  self::$cnt_notes = ilNote::_countNotesAndCommentsMultiple($a_obj_ids, true);
3715  self::$comments_activation = ilNote::getRepObjActivation($a_obj_ids);
3716  }
3717 
3718  self::$preload_done = true;
3719  }
static _countTags($a_obj_ids)
Count all tags for repository objects.
static getRepObjActivation($a_rep_obj_ids)
Get activation for repository objects.
global $lng
Definition: privfeed.php:40
static _countNotesAndCommentsMultiple($a_rep_obj_ids, $a_no_sub_objs=false)
Get all notes related to multiple objcts.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareJsLinks()

static ilObjectListGUI::prepareJsLinks (   $a_redraw_url,
  $a_notes_url,
  $a_tags_url,
  $a_tpl = null 
)
static

Insert js/ajax links into template.

Definition at line 2959 of file class.ilObjectListGUI.php.

References $tpl, ilTaggingGUI\initJavascript(), and ilNoteGUI\initJavascript().

Referenced by ilObjWorkspaceFolderGUI\render().

2960  {
2961  global $tpl;
2962 
2963  if (is_null($a_tpl))
2964  {
2965  $a_tpl = $tpl;
2966  }
2967 
2968  if($a_notes_url)
2969  {
2970  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
2971  ilNoteGUI::initJavascript($a_notes_url);
2972  }
2973 
2974  if($a_tags_url)
2975  {
2976  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
2977  ilTaggingGUI::initJavascript($a_tags_url);
2978  }
2979 
2980  if($a_redraw_url)
2981  {
2982  $a_tpl->addOnLoadCode("il.Object.setRedrawAHUrl('".
2983  $a_redraw_url."');");
2984  }
2985  }
initJavascript($a_ajax_url)
Init javascript.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
initJavascript($a_ajax_url)
Init javascript.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ restrictToGoto()

ilObjectListGUI::restrictToGoto (   $a_value)

Restrict all actions/links to goto.

Parameters
bool$a_value

Definition at line 908 of file class.ilObjectListGUI.php.

909  {
910  $this->restrict_to_goto = (bool)$a_value;
911  }

◆ setAdditionalInformation()

ilObjectListGUI::setAdditionalInformation (   $a_val)

Set additional information.

Parameters
stringadditional information

Definition at line 857 of file class.ilObjectListGUI.php.

858  {
859  $this->additional_information = $a_val;
860  }

◆ setAjaxHash()

ilObjectListGUI::setAjaxHash (   $a_hash)

Definition at line 3027 of file class.ilObjectListGUI.php.

Referenced by getListItemHTML().

3028  {
3029  $this->ajax_hash = $a_hash;
3030  }
+ Here is the caller graph for this function:

◆ setBoldTitle()

ilObjectListGUI::setBoldTitle (   $a_bold_title)

public boolean $a_bold_title set the item title bold

Definition at line 3678 of file class.ilObjectListGUI.php.

3679  {
3680  $this->bold_title = $a_bold_title;
3681 
3682  }

◆ setConditionDepth()

ilObjectListGUI::setConditionDepth (   $a_depth)

set depth for precondition output (stops at level 5)

Definition at line 1696 of file class.ilObjectListGUI.php.

1697  {
1698  $this->condition_depth = $a_depth;
1699  }

◆ setContainerObject()

ilObjectListGUI::setContainerObject (   $container_obj)

set the container object (e.g categorygui) Used for link, delete ...

commands

this method should be overwritten by derived classes

Definition at line 155 of file class.ilObjectListGUI.php.

156  {
157  $this->container_obj = $container_obj;
158  }

◆ setDescription()

ilObjectListGUI::setDescription (   $a_description)
Parameters
stringdescription
Returns
bool

Definition at line 785 of file class.ilObjectListGUI.php.

Referenced by initItem().

786  {
787  $this->description = $a_description;
788  }
+ Here is the caller graph for this function:

◆ setDetailsLevel()

ilObjectListGUI::setDetailsLevel (   $a_level)

Details level Currently used in Search which shows only limited properties of forums Currently used for Sessions (switch between minimal and extended view for each session)

Parameters
int$a_level
Returns

Definition at line 879 of file class.ilObjectListGUI.php.

880  {
881  $this->details_level = $a_level;
882  }

◆ setExpanded()

ilObjectListGUI::setExpanded (   $a_status)

Definition at line 417 of file class.ilObjectListGUI.php.

418  {
419  $this->is_expanded = $a_status;
420  }

◆ setHeaderSubObject()

ilObjectListGUI::setHeaderSubObject (   $a_type,
  $a_id 
)

Set sub object identifier.

Parameters
string$a_type
int$a_id

Definition at line 2993 of file class.ilObjectListGUI.php.

2994  {
2995  $this->sub_obj_type = $a_type;
2996  $this->sub_obj_id = (int)$a_id;
2997  }

◆ setItemDetailLinks()

ilObjectListGUI::setItemDetailLinks (   $a_detail_links,
  $a_intro_txt = '' 
)

set items detail links

public

Parameters
arraye.g. array(0 => array('desc' => 'Page: ','link' => 'ilias.php...','name' => 'Page XYZ')
Returns

Definition at line 721 of file class.ilObjectListGUI.php.

722  {
723  $this->item_detail_links = $a_detail_links;
724  $this->item_detail_links_intro = $a_intro_txt;
725  }

◆ setMode()

ilObjectListGUI::setMode (   $a_mode)

set output mode

Parameters
string$a_modeoutput mode (IL_LIST_FULL | IL_LIST_AS_TRIGGER)

Definition at line 1678 of file class.ilObjectListGUI.php.

1679  {
1680  $this->mode = $a_mode;
1681  }

◆ setParentRefId()

ilObjectListGUI::setParentRefId (   $a_ref_id)

Set current parent ref id to enable unique js-ids (sessions, etc.)

Parameters
int$a_ref_id

Definition at line 3619 of file class.ilObjectListGUI.php.

Referenced by ilObjectListGUI().

3620  {
3621  $this->parent_ref_id = $a_ref_id;
3622  }
+ Here is the caller graph for this function:

◆ setPositionInputField()

ilObjectListGUI::setPositionInputField (   $a_field_index,
  $a_position_value 
)

Set position input field.

Parameters
string$a_field_indexe.g. "[crs][34]"
string$a_position_valuee.g. "2.0"

Definition at line 432 of file class.ilObjectListGUI.php.

433  {
434  $this->position_enabled = true;
435  $this->position_field_index = $a_field_index;
436  $this->position_value = $a_position_value;
437  }

◆ setRelevance()

ilObjectListGUI::setRelevance (   $a_rel)

set relevance

Parameters
int
Returns

Definition at line 342 of file class.ilObjectListGUI.php.

343  {
344  $this->relevance = $a_rel;
345  }

◆ setSearchFragment()

ilObjectListGUI::setSearchFragment (   $a_text)

set search fragment

Parameters
string$a_texthighlighted search fragment
Returns

Definition at line 805 of file class.ilObjectListGUI.php.

806  {
807  $this->search_fragment = $a_text;
808  }

◆ setSeparateCommands()

ilObjectListGUI::setSeparateCommands (   $a_val)

Set separate commands.

Parameters
booleanseparate commands

Definition at line 824 of file class.ilObjectListGUI.php.

825  {
826  $this->separate_commands = $a_val;
827  }

◆ setTitle()

ilObjectListGUI::setTitle (   $a_title)
Parameters
stringtitle
Returns
bool

Definition at line 766 of file class.ilObjectListGUI.php.

Referenced by initItem().

767  {
768  $this->title = $a_title;
769  }
+ Here is the caller graph for this function:

◆ storeAccessCache()

ilObjectListGUI::storeAccessCache ( )

Store access cache.

Definition at line 3405 of file class.ilObjectListGUI.php.

References $ilUser, and $ref_id.

Referenced by getListItemHTML().

3406  {
3407  global $ilUser;
3408  if($this->acache->getLastAccessStatus() == "miss" &&
3409  !$this->prevent_access_caching)
3410  {
3411  $this->acache->storeEntry($ilUser->getId().":".$this->ref_id,
3412  serialize($this->access_cache), $this->ref_id);
3413  }
3414  }
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

Field Documentation

◆ $additional_information

ilObjectListGUI::$additional_information = false
protected

Definition at line 90 of file class.ilObjectListGUI.php.

Referenced by getAdditionalInformation().

◆ $bold_title

ilObjectListGUI::$bold_title = false
protected

Definition at line 81 of file class.ilObjectListGUI.php.

Referenced by isTitleBold().

◆ $checkboxes_enabled

ilObjectListGUI::$checkboxes_enabled = false
protected

Definition at line 65 of file class.ilObjectListGUI.php.

Referenced by getCheckboxStatus().

◆ $cnt_notes

ilObjectListGUI::$cnt_notes = array()
staticprotected

Definition at line 112 of file class.ilObjectListGUI.php.

◆ $cnt_tags

ilObjectListGUI::$cnt_tags = array()
staticprotected

Definition at line 113 of file class.ilObjectListGUI.php.

◆ $commands_enabled

ilObjectListGUI::$commands_enabled = true

Definition at line 45 of file class.ilObjectListGUI.php.

Referenced by getCommandsStatus().

◆ $comments_activation

ilObjectListGUI::$comments_activation = array()
staticprotected

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

◆ $comments_enabled

ilObjectListGUI::$comments_enabled = false
protected

Definition at line 97 of file class.ilObjectListGUI.php.

Referenced by getHeaderAction(), and insertCommonSocialCommands().

◆ $comments_settings_enabled

ilObjectListGUI::$comments_settings_enabled = false
protected

Definition at line 98 of file class.ilObjectListGUI.php.

◆ $condition_depth

ilObjectListGUI::$condition_depth = 0

Definition at line 49 of file class.ilObjectListGUI.php.

◆ $copy_enabled

ilObjectListGUI::$copy_enabled = true
protected

Definition at line 83 of file class.ilObjectListGUI.php.

Referenced by getCopyStatus().

◆ $ctrl

ilObjectListGUI::$ctrl

Definition at line 40 of file class.ilObjectListGUI.php.

◆ $cust_commands

ilObjectListGUI::$cust_commands = array()

Definition at line 47 of file class.ilObjectListGUI.php.

◆ $cust_prop

ilObjectListGUI::$cust_prop = array()

Definition at line 46 of file class.ilObjectListGUI.php.

◆ $description_enabled

ilObjectListGUI::$description_enabled = true

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

Referenced by getDescriptionStatus().

◆ $details_level

ilObjectListGUI::$details_level = self::DETAILS_ALL
protected

Definition at line 85 of file class.ilObjectListGUI.php.

Referenced by getDetailsLevel().

◆ $download_checkbox_state

ilObjectListGUI::$download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE

Definition at line 53 of file class.ilObjectListGUI.php.

Referenced by getDownloadCheckboxState().

◆ $enabled_relevance

ilObjectListGUI::$enabled_relevance = false
protected

Definition at line 76 of file class.ilObjectListGUI.php.

Referenced by enabledRelevance().

◆ $expand_enabled

ilObjectListGUI::$expand_enabled = false
protected

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

Referenced by getExpandStatus().

◆ $force_visible_only

ilObjectListGUI::$force_visible_only = false
protected

Definition at line 108 of file class.ilObjectListGUI.php.

Referenced by isVisibleOnlyForced().

◆ $icons_enabled

ilObjectListGUI::$icons_enabled = false
protected

Definition at line 64 of file class.ilObjectListGUI.php.

Referenced by getIconStatus().

◆ $info_screen_enabled

ilObjectListGUI::$info_screen_enabled = false

◆ $is_expanded

ilObjectListGUI::$is_expanded = true
protected

Definition at line 80 of file class.ilObjectListGUI.php.

Referenced by isExpanded().

◆ $item_detail_links

ilObjectListGUI::$item_detail_links = array()
protected

Definition at line 69 of file class.ilObjectListGUI.php.

◆ $item_detail_links_enabled

ilObjectListGUI::$item_detail_links_enabled = false
protected

Definition at line 68 of file class.ilObjectListGUI.php.

Referenced by getItemDetailLinkStatus().

◆ $item_detail_links_intro

ilObjectListGUI::$item_detail_links_intro = ''
protected

Definition at line 70 of file class.ilObjectListGUI.php.

◆ $multi_download_enabled

ilObjectListGUI::$multi_download_enabled = false

Definition at line 52 of file class.ilObjectListGUI.php.

◆ $notes_enabled

ilObjectListGUI::$notes_enabled = false
protected

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

◆ $notice_properties_enabled

ilObjectListGUI::$notice_properties_enabled = true

Definition at line 44 of file class.ilObjectListGUI.php.

Referenced by getNoticePropertiesStatus().

◆ $obj_id

◆ $parent_ref_id

ilObjectListGUI::$parent_ref_id
protected

Definition at line 110 of file class.ilObjectListGUI.php.

Referenced by insertTimingsCommand().

◆ $path_linked

ilObjectListGUI::$path_linked = false
protected

Definition at line 74 of file class.ilObjectListGUI.php.

◆ $position_enabled

ilObjectListGUI::$position_enabled = false
protected

Definition at line 66 of file class.ilObjectListGUI.php.

◆ $preconditions_enabled

ilObjectListGUI::$preconditions_enabled = true

Definition at line 42 of file class.ilObjectListGUI.php.

Referenced by getPreconditionsStatus().

◆ $preload_done

ilObjectListGUI::$preload_done = false
staticprotected

Definition at line 115 of file class.ilObjectListGUI.php.

◆ $prevent_duplicate_commands

ilObjectListGUI::$prevent_duplicate_commands = array()
protected

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

◆ $progress_enabled

ilObjectListGUI::$progress_enabled = false
protected

Definition at line 67 of file class.ilObjectListGUI.php.

Referenced by getProgressInfoStatus().

◆ $properties_enabled

ilObjectListGUI::$properties_enabled = true

Definition at line 43 of file class.ilObjectListGUI.php.

Referenced by getPropertiesStatus().

◆ $rating_categories_enabled

ilObjectListGUI::$rating_categories_enabled = false
protected

Definition at line 103 of file class.ilObjectListGUI.php.

◆ $rating_ctrl_path

ilObjectListGUI::$rating_ctrl_path = false
protected

Definition at line 105 of file class.ilObjectListGUI.php.

◆ $rating_enabled

ilObjectListGUI::$rating_enabled = false
protected

Definition at line 102 of file class.ilObjectListGUI.php.

◆ $rating_text

ilObjectListGUI::$rating_text = false
protected

Definition at line 104 of file class.ilObjectListGUI.php.

◆ $ref_id

◆ $reference_ref_id

ilObjectListGUI::$reference_ref_id = false
protected

Definition at line 87 of file class.ilObjectListGUI.php.

Referenced by insertCommonSocialCommands(), and insertProperties().

◆ $relevance

ilObjectListGUI::$relevance = 0
protected

Definition at line 77 of file class.ilObjectListGUI.php.

Referenced by getRelevance().

◆ $repository_transfer_enabled

ilObjectListGUI::$repository_transfer_enabled = false
protected

Definition at line 93 of file class.ilObjectListGUI.php.

◆ $restrict_to_goto

ilObjectListGUI::$restrict_to_goto = false
protected

Definition at line 95 of file class.ilObjectListGUI.php.

◆ $search_fragment

ilObjectListGUI::$search_fragment = ''
protected

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

Referenced by getSearchFragment().

◆ $search_fragment_enabled

ilObjectListGUI::$search_fragment_enabled = false
protected

Definition at line 89 of file class.ilObjectListGUI.php.

Referenced by getSearchFragmentStatus().

◆ $search_fragments_enabled

ilObjectListGUI::$search_fragments_enabled = false
protected

Definition at line 72 of file class.ilObjectListGUI.php.

◆ $separate_commands

ilObjectListGUI::$separate_commands = false
protected

Definition at line 88 of file class.ilObjectListGUI.php.

Referenced by getSeparateCommands().

◆ $shared

ilObjectListGUI::$shared = false
protected

Definition at line 94 of file class.ilObjectListGUI.php.

◆ $static_link_enabled

ilObjectListGUI::$static_link_enabled = false
protected

Definition at line 91 of file class.ilObjectListGUI.php.

◆ $std_cmd_only

ilObjectListGUI::$std_cmd_only = false

Definition at line 50 of file class.ilObjectListGUI.php.

◆ $sub_item_html

ilObjectListGUI::$sub_item_html = array()

Definition at line 51 of file class.ilObjectListGUI.php.

◆ $sub_obj_id

ilObjectListGUI::$sub_obj_id
protected

Definition at line 58 of file class.ilObjectListGUI.php.

◆ $sub_obj_type

ilObjectListGUI::$sub_obj_type
protected

Definition at line 59 of file class.ilObjectListGUI.php.

◆ $substitutions

ilObjectListGUI::$substitutions = null
protected

Definition at line 61 of file class.ilObjectListGUI.php.

◆ $substitutions_enabled

ilObjectListGUI::$substitutions_enabled = false
protected

Definition at line 62 of file class.ilObjectListGUI.php.

Referenced by getSubstitutionStatus().

◆ $tags_enabled

ilObjectListGUI::$tags_enabled = false
protected

Definition at line 100 of file class.ilObjectListGUI.php.

◆ $timings_enabled

ilObjectListGUI::$timings_enabled = true
protected

Definition at line 107 of file class.ilObjectListGUI.php.

◆ $type

◆ CONTEXT_PERSONAL_DESKTOP

◆ CONTEXT_REPOSITORY

const ilObjectListGUI::CONTEXT_REPOSITORY = 1

◆ CONTEXT_SEARCH

const ilObjectListGUI::CONTEXT_SEARCH = 6

◆ CONTEXT_SHOP

const ilObjectListGUI::CONTEXT_SHOP = 3

Definition at line 31 of file class.ilObjectListGUI.php.

Referenced by ilShopResultPresentationGUI\renderItems().

◆ CONTEXT_WORKSPACE

const ilObjectListGUI::CONTEXT_WORKSPACE = 2

◆ CONTEXT_WORKSPACE_SHARING

const ilObjectListGUI::CONTEXT_WORKSPACE_SHARING = 4

Definition at line 32 of file class.ilObjectListGUI.php.

◆ DETAILS_ALL

◆ DETAILS_MINIMAL

const ilObjectListGUI::DETAILS_MINIMAL = 10

◆ DETAILS_SEARCH

const ilObjectListGUI::DETAILS_SEARCH = 20

◆ DOWNLOAD_CHECKBOX_DISABLED

const ilObjectListGUI::DOWNLOAD_CHECKBOX_DISABLED = 2

Definition at line 38 of file class.ilObjectListGUI.php.

◆ DOWNLOAD_CHECKBOX_ENABLED

const ilObjectListGUI::DOWNLOAD_CHECKBOX_ENABLED = 1

Definition at line 37 of file class.ilObjectListGUI.php.

◆ DOWNLOAD_CHECKBOX_NONE

const ilObjectListGUI::DOWNLOAD_CHECKBOX_NONE = 0

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


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