ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjectListGUI Class Reference

Class ilObjectListGUI. More...

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

Public Member Functions

 __construct ($a_context=self::CONTEXT_REPOSITORY)
 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 ()
 
 enableLink ($a_status)
 En/disable link. More...
 
 getLinkStatus ()
 
 enablePath ($a_path, $a_start_node=null)
 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="")
 inititialize new item (is called by getItemHTML()) More...
 
 setConditionTarget ($a_ref_id, $a_obj_id, $a_target_type)
 
 resetConditionTarget ()
 
 disableTitleLink ($a_status)
 
 setDefaultCommandParameters (array $a_params)
 
 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 ()
 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 ()
 insert properties More...
 
 insertNoticeProperties ()
 
 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)
 
 addHeaderGlyph ($a_id, $a_glyph, $a_onclick=null)
 
 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="")
 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_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 ()
 
 parseConditions ($toggle_id, $conditions, $obligatory=true)
 
 modifyTitleLink ($a_default_link)
 
 resetCustomData ()
 reset properties and commands More...
 
 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
 
 $context
 
 $title_link = ''
 
 $title_link_disabled = false
 
 $ui
 

Static Protected Attributes

static $cnt_notes = array()
 
static $cnt_tags = array()
 
static $tags = array()
 
static $comments_activation = array()
 
static $preload_done = false
 
static $js_unique_id = 0
 
static $tpl_file_name = "tpl.container_list_item.html"
 
static $tpl_component = "Services/Container"
 

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.

Constructor & Destructor Documentation

◆ __construct()

ilObjectListGUI::__construct (   $a_context = self::CONTEXT_REPOSITORY)

constructor

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

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

137  {
138  global $ilias, $DIC;
139 
140  $this->ui = $DIC->ui();
141  $this->rbacsystem = $DIC->rbac()->system();
142  $this->ilias = $ilias;
143  $this->ctrl = $DIC->ctrl();
144  $this->lng = $DIC->language();
145  $this->mode = IL_LIST_FULL;
146  $this->path_enabled = false;
147  $this->context = $a_context;
148 
149  $this->enableComments(false);
150  $this->enableNotes(false);
151  $this->enableTags(false);
152 
153  // unique js-ids
154  $this->setParentRefId((int) $_REQUEST["ref_id"]);
155 
156 //echo "list";
157  $this->init();
158 
159  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
160  $this->ldap_mapping = ilLDAPRoleGroupMapping::_getInstance();
161 
162  $this->lng->loadLanguageModule("obj");
163  }
init()
initialisation
enableNotes($a_value)
Toogle notes action status.
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 $DIC
+ Here is the call graph for this function:

Member Function Documentation

◆ addCustomCommand()

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

add a custom command

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

References array.

1322  {
1323  $this->cust_commands[] =
1324  array("link" => $a_link, "lang_var" => $a_lang_var,
1325  "frame" => $a_frame, "onclick" => $onclick);
1326  }
Create styles array
The data for the language used.

◆ addCustomProperty()

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

add custom property

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

References array.

Referenced by ilContainerObjectiveGUI\addItemDetails(), ilObjectActivation\addListGUIActivationProperty(), getListItemHTML(), ilObjRemoteGroupListGUI\getProperties(), ilObjRemoteGlossaryListGUI\getProperties(), ilObjRemoteWikiListGUI\getProperties(), ilObjRemoteTestListGUI\getProperties(), ilObjRemoteLearningModuleListGUI\getProperties(), ilObjRemoteCategoryListGUI\getProperties(), ilObjRemoteCourseListGUI\getProperties(), ilObjRemoteFileListGUI\getProperties(), and insertCommands().

1266  {
1267  $this->cust_prop[] = array("property" => $a_property, "value" => $a_value,
1268  "alert" => $a_alert, "newline" => $a_newline);
1269  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addHeaderGlyph()

ilObjectListGUI::addHeaderGlyph (   $a_id,
  $a_glyph,
  $a_onclick = null 
)
Parameters
string$a_id
string$a_html

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

References array.

Referenced by getHeaderAction().

2960  {
2961  $this->header_icons[$a_id] = array("glyph" => $a_glyph, "onclick" => $a_onclick);
2962  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ 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 2935 of file class.ilObjectListGUI.php.

References array.

2936  {
2937  $this->header_icons[$a_id] = array("img" => $a_img,
2938  "tooltip" => $a_tooltip,
2939  "onclick" => $a_onclick,
2940  "status_text" => $a_status_text,
2941  "href" => $a_href);
2942  }
Create styles array
The data for the language used.

◆ addHeaderIconHTML()

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

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

Referenced by getHeaderAction().

2950  {
2951  $this->header_icons[$a_id] = $a_html;
2952  }
+ 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 626 of file class.ilObjectListGUI.php.

627  {
628  $this->sub_item_html[] = $a_html;
629  }

◆ adminCommandsIncluded()

ilObjectListGUI::adminCommandsIncluded ( )

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

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

3402  {
3403  return $this->adm_commands_included;
3404  }

◆ appendRepositoryFrameParameter()

ilObjectListGUI::appendRepositoryFrameParameter (   $a_link)

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

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

References $_GET, $_SERVER, and ilUtil\appendUrlParameterString().

Referenced by insertCommands(), and insertTitle().

3164  {
3165  $script = substr(strrchr($_SERVER["PHP_SELF"],"/"),1);
3166 
3167  // we should get rid of this nonsense with 4.4 (alex)
3168  if ((strtolower($_GET["baseClass"]) != "ilrepositorygui") &&
3169  is_int(strpos($a_link,"baseClass=ilRepositoryGUI")))
3170  {
3171  if ($this->type != "frm")
3172  {
3173  $a_link =
3174  ilUtil::appendUrlParameterString($a_link, "rep_frame=1");
3175  }
3176  }
3177 
3178  return $a_link;
3179  }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
$_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 1560 of file class.ilObjectListGUI.php.

References ilWorkspaceAccessHandler\getGotoLink().

Referenced by insertTitle().

1561  {
1562  switch($this->context)
1563  {
1564  case self::CONTEXT_WORKSPACE_SHARING:
1565  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
1566  return ilWorkspaceAccessHandler::getGotoLink($this->ref_id, $this->obj_id);
1567 
1568  default:
1569  // not implemented yet
1570  break;
1571  }
1572  }
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 916 of file class.ilObjectListGUI.php.

References $a_type, and isVisibleOnlyForced().

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

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

References $params, ilLink\_getStaticLink(), and array.

Referenced by insertCommands().

1023  {
1024  // begin-patch lok
1025  if($this->static_link_enabled and !$this->default_command_params)
1026  {
1027  include_once('./Services/Link/classes/class.ilLink.php');
1028  if($link = ilLink::_getStaticLink($this->ref_id,$this->type,false))
1029  {
1030  $command['link'] = $link;
1031  $command['frame'] = '_top';
1032  }
1033  }
1034  if($this->default_command_params)
1035  {
1036  $params = array();
1037  foreach($this->default_command_params as $name => $value)
1038  {
1039  $params[] = $name.'='.$value;
1040  }
1041  $params = implode('&', $params);
1042 
1043  // #12370
1044  if(!stristr($command['link'], '?'))
1045  {
1046  $command['link'] .= '?'.$params;
1047  }
1048  else
1049  {
1050  $command['link'] .= '&'.$params;
1051  }
1052  }
1053  return $command;
1054  }
Create styles array
The data for the language used.
$params
Definition: example_049.php:96
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disableTitleLink()

ilObjectListGUI::disableTitleLink (   $a_status)

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

Referenced by ilContainerObjectiveGUI\addItemDetails().

1003  {
1004  $this->title_link_disabled = $a_status;
1005  }
+ Here is the caller graph for this function:

◆ enableCheckbox()

ilObjectListGUI::enableCheckbox (   $a_status)

En/Dis-able checkboxes.

Parameters
booleancheckbox on/off

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), ilStudyProgrammeExpandableProgressListGUI\configureItemGUI(), and ilObjStudyProgrammeListGUI\getListItemHTML().

399  {
400  $this->checkboxes_enabled = $a_status;
401  }
+ Here is the caller graph for this function:

◆ enableCommands()

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

En/disable commands.

Parameters
bool
Returns
void

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

Referenced by ilContainerObjectiveGUI\addItemDetails(), ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

596  {
597  $this->commands_enabled = $a_status;
598  $this->std_cmd_only = $a_std_only;
599  }
+ Here is the caller graph for this function:

◆ enableComments()

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

Toogle comments action status.

Parameters
boolean$a_value

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

References $ilSetting.

Referenced by __construct(), ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

2749  {
2750  global $ilSetting;
2751 
2752  // global switch
2753  if($ilSetting->get("disable_comments"))
2754  {
2755  $a_value = false;
2756  }
2757 
2758  $this->comments_enabled = (bool)$a_value;
2759  $this->comments_settings_enabled = (bool)$a_enable_comments_settings;
2760  }
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ enableCopy()

ilObjectListGUI::enableCopy (   $a_status)

En/disable copy.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

507  {
508  $this->copy_enabled = $a_status;
509 
510  return;
511  }
+ Here is the caller graph for this function:

◆ enableCut()

ilObjectListGUI::enableCut (   $a_status)

En/disable cut.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

485  {
486  $this->cut_enabled = $a_status;
487 
488  return;
489  }
+ Here is the caller graph for this function:

◆ enableDelete()

ilObjectListGUI::enableDelete (   $a_status)

En/disable delete.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

462  {
463  $this->delete_enabled = $a_status;
464 
465  return;
466  }
+ Here is the caller graph for this function:

◆ enableDescription()

ilObjectListGUI::enableDescription (   $a_status)

En/disable description.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

285  {
286  $this->description_enabled = $a_status;
287 
288  return;
289  }
+ Here is the caller graph for this function:

◆ enableDownloadCheckbox()

ilObjectListGUI::enableDownloadCheckbox (   $a_ref_id,
  $a_value 
)

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

References $_SESSION, array, and getContainerObject().

2856  {
2857  global $ilAccess;
2858 
2859  // TODO: delegate to list object class!
2860  if (!$this->getContainerObject()->isActiveAdministrationPanel() || $_SESSION["clipboard"])
2861  {
2862  if (in_array($this->type, array("file", "fold")) &&
2863  $ilAccess->checkAccess("read", "", $a_ref_id, $this->type))
2864  {
2865  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_ENABLED;
2866  }
2867  else
2868  {
2869  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_DISABLED;
2870  }
2871  }
2872  else
2873  {
2874  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE;
2875  }
2876  }
getContainerObject()
get container object
$_SESSION["AccountId"]
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ enabledRelevance()

ilObjectListGUI::enabledRelevance ( )

enabled relevance

Returns

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

References $enabled_relevance.

Referenced by getListItemHTML(), and insertRelevance().

340  {
342  }
+ 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 418 of file class.ilObjectListGUI.php.

419  {
420  $this->expand_enabled = $a_status;
421  }

◆ enableIcon()

ilObjectListGUI::enableIcon (   $a_status)

En/Dis-able icons.

Parameters
booleanicons on/off

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), ilStudyProgrammeExpandableProgressListGUI\configureItemGUI(), and ilObjOrgUnitListGUI\insertIconsAndCheckboxes().

379  {
380  $this->icons_enabled = $a_status;
381  }
+ Here is the caller graph for this function:

◆ enableInfoScreen()

ilObjectListGUI::enableInfoScreen (   $a_info_screen)

En/disable path.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

617  {
618  $this->info_screen_enabled = $a_info_screen;
619  }
+ Here is the caller graph for this function:

◆ enableItemDetailLinks()

ilObjectListGUI::enableItemDetailLinks (   $a_status)

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

public

Parameters
bool
Returns

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

Referenced by ilContainerObjectiveGUI\addItemDetails().

697  {
698  $this->item_detail_links_enabled = $a_status;
699  }
+ Here is the caller graph for this function:

◆ enableLink()

ilObjectListGUI::enableLink (   $a_status)

En/disable link.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

551  {
552  $this->link_enabled = $a_status;
553 
554  return;
555  }
+ Here is the caller graph for this function:

◆ enableLinkedPath()

ilObjectListGUI::enableLinkedPath (   $a_status)

Enable linked path.

Parameters
bool
Returns

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

331  {
332  $this->path_linked = $a_status;
333  }

◆ 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 2820 of file class.ilObjectListGUI.php.

2821  {
2822  $folder_set = new ilSetting("fold");
2823  if (!$folder_set->get("enable_multi_download"))
2824  {
2825  $a_value = false;
2826  }
2827  $this->multi_download_enabled = (bool)$a_value;
2828  }
ILIAS Setting Class.

◆ enableNotes()

ilObjectListGUI::enableNotes (   $a_value)

Toogle notes action status.

Parameters
boolean$a_value

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

References $ilSetting.

Referenced by __construct().

2768  {
2769  global $ilSetting;
2770 
2771  // global switch
2772  if($ilSetting->get("disable_notes"))
2773  {
2774  $a_value = false;
2775  }
2776 
2777  $this->notes_enabled = (bool)$a_value;
2778  }
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ enableNoticeProperties()

ilObjectListGUI::enableNoticeProperties (   $a_status)

En/disable notices.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

263  {
264  $this->notice_properties_enabled = $a_status;
265 
266  return;
267  }
+ Here is the caller graph for this function:

◆ enablePath()

ilObjectListGUI::enablePath (   $a_path,
  $a_start_node = null 
)

En/disable path.

Parameters
bool
int
Returns
void

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

574  {
575  $this->path_enabled = $a_path;
576  $this->path_start_node = (int)$a_start_node;
577  }

◆ enablePreconditions()

ilObjectListGUI::enablePreconditions (   $a_status)

En/disable preconditions.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

245  {
246  $this->preconditions_enabled = $a_status;
247 
248  return;
249  }
+ Here is the caller graph for this function:

◆ enableProgressInfo()

ilObjectListGUI::enableProgressInfo (   $a_status)

enable progress info

public

Parameters

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

649  {
650  $this->progress_enabled = $a_status;
651  }
+ Here is the caller graph for this function:

◆ enableProperties()

ilObjectListGUI::enableProperties (   $a_status)

En/disable properties.

Parameters
bool
Returns
void

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

Referenced by ilContainerObjectiveGUI\addItemDetails(), ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), ilStudyProgrammeExpandableProgressListGUI\configureItemGUI(), and insertCommands().

223  {
224  $this->properties_enabled = $a_status;
225 
226  return;
227  }
+ 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 2803 of file class.ilObjectListGUI.php.

2804  {
2805  $this->rating_enabled = (bool)$a_value;
2806 
2807  if($this->rating_enabled)
2808  {
2809  $this->rating_categories_enabled = (bool)$a_categories;
2810  $this->rating_text = $a_text;
2811  $this->rating_ctrl_path = $a_ctrl_path;
2812  }
2813  }

◆ enableRelevance()

ilObjectListGUI::enableRelevance (   $a_status)

enable relevance

Returns

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

349  {
350  $this->enabled_relevance = $a_status;
351  }

◆ enableRepositoryTransfer()

ilObjectListGUI::enableRepositoryTransfer (   $a_value)

Enable copy/move to repository (from personal workspace)

Parameters
bool$a_value

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

897  {
898  $this->repository_transfer_enabled = (bool)$a_value;
899  }

◆ enableSearchFragments()

ilObjectListGUI::enableSearchFragments (   $a_status)

En/disable description.

Parameters
bool
Returns
void

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

319  {
320  $this->search_fragment_enabled = $a_status;
321 
322  return;
323  }

◆ enableSubscribe()

ilObjectListGUI::enableSubscribe (   $a_status)

En/disable subscribe.

Parameters
bool
Returns
void

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

Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), and ilStudyProgrammeExpandableProgressListGUI\configureItemGUI().

529  {
530  $this->subscribe_enabled = $a_status;
531 
532  return;
533  }
+ Here is the caller graph for this function:

◆ enableSubstitutions()

ilObjectListGUI::enableSubstitutions (   $a_status)

Enable substitutions.

public

Parameters

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

673  {
674  $this->substitutions_enabled = $a_status;
675  }

◆ enableTags()

ilObjectListGUI::enableTags (   $a_value)

Toogle tags action status.

Parameters
boolean$a_value

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

Referenced by __construct(), ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), ilStudyProgrammeExpandableProgressListGUI\configureItemGUI(), and ilTaggingClassificationProvider\initListGUI().

2786  {
2787  $tags_set = new ilSetting("tags");
2788  if (!$tags_set->get("enable"))
2789  {
2790  $a_value = false;
2791  }
2792  $this->tags_enabled = (bool)$a_value;
2793  }
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 3829 of file class.ilObjectListGUI.php.

3830  {
3831  $this->timings_enabled = (bool)$a_status;
3832  }

◆ forceVisibleOnly()

ilObjectListGUI::forceVisibleOnly (   $a_stat)

Force visible access only.

Parameters
type$a_stat

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

1333  {
1334  $this->force_visible_only = $a_stat;
1335  }

◆ getAdditionalInformation()

ilObjectListGUI::getAdditionalInformation ( )

Get additional information.

Returns
string additional information

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

References $additional_information.

Referenced by getListItemHTML().

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

◆ getAlertProperties()

ilObjectListGUI::getAlertProperties ( )

get all alert properties

Returns
array

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

References array, and getProperties().

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

◆ getCheckboxStatus()

ilObjectListGUI::getCheckboxStatus ( )

Are checkboxes enabled?

Returns
boolean icons enabled?

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

References $checkboxes_enabled.

Referenced by ilObjStudyProgrammeListGUI\getListItemHTML(), and insertIconsAndCheckboxes().

409  {
411  }
+ 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 1117 of file class.ilObjectListGUI.php.

References ilDAVActivationChecker\_isActive().

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

1118  {
1119  // BEGIN WebDAV Get mount webfolder link.
1120  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1121  if ($a_cmd == 'mount_webfolder' && ilDAVActivationChecker::_isActive())
1122  {
1123  return '_blank';
1124  }
1125  // begin-patch fm
1126  if($a_cmd == 'fileManagerLaunch')
1127  {
1128  return '_blank';
1129  }
1130  // end-patch fm
1131  return "";
1132  }
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 845 of file class.ilObjectListGUI.php.

References $ref_id.

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

846  {
847  return $this->ref_id;
848  }
+ 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 1143 of file class.ilObjectListGUI.php.

Referenced by getCommands().

1144  {
1145  return "";
1146  }
+ 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 1068 of file class.ilObjectListGUI.php.

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

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

1069  {
1070  if($this->context == self::CONTEXT_REPOSITORY)
1071  {
1072  // BEGIN WebDAV Get mount webfolder link.
1073  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1074  if ($a_cmd == 'mount_webfolder' && ilDAVActivationChecker::_isActive())
1075  {
1076  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
1077  $davServer = ilDAVServer::getInstance();
1078 
1079  // XXX: The following is a very dirty, ugly trick.
1080  // To mount URI needs to be put into two attributes:
1081  // href and folder. This hack returns both attributes
1082  // like this: http://...mount_uri..." folder="http://...folder_uri...
1083  return $davServer->getMountURI($this->ref_id).
1084  '" folder="'.$davServer->getFolderURI($this->ref_id);
1085  }
1086  // END WebDAV Get mount webfolder link.
1087 
1088  $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->getCommandId());
1089  $cmd_link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
1090  $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
1091  return $cmd_link;
1092 
1093  /* separate method for this line
1094  $cmd_link = $this->ctrl->getLinkTargetByClass($this->gui_class_name,
1095  $a_cmd);
1096  return $cmd_link;
1097  */
1098  }
1099  else
1100  {
1101  $this->ctrl->setParameterByClass($this->gui_class_name, "ref_id", "");
1102  $this->ctrl->setParameterByClass($this->gui_class_name, "wsp_id", $this->ref_id);
1103  return $this->ctrl->getLinkTargetByClass($this->gui_class_name, $a_cmd);
1104  }
1105  }
$_GET["client_id"]
static _isActive()
Static getter.
getCommandId()
get command id Normally the ref id.
static getInstance()
Get singelton instance.
+ 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 1369 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

1370  {
1371  global $ilAccess, $ilBench;
1372 
1373  $ref_commands = array();
1374  foreach($this->commands as $command)
1375  {
1376  $permission = $command["permission"];
1377  $cmd = $command["cmd"];
1378  $lang_var = $command["lang_var"];
1379  $txt = "";
1380  $info_object = null;
1381 
1382  if (isset($command["txt"]))
1383  {
1384  $txt = $command["txt"];
1385  }
1386 
1387  // BEGIN WebDAV: Suppress commands that don't make sense for anonymous users.
1388  // Suppress commands that don't make sense for anonymous users
1389  global $ilias;
1390  if ($ilias->account->getId() == ANONYMOUS_USER_ID &&
1391  $command['enable_anonymous'] == 'false')
1392  {
1393  continue;
1394  }
1395  // END WebDAV: Suppress commands that don't make sense for anonymous users.
1396 
1397  // all access checking should be made within $ilAccess and
1398  // the checkAccess of the ilObj...Access classes
1399  $ilBench->start("ilObjectListGUI", "4110_get_commands_check_access");
1400  //$access = $ilAccess->checkAccess($permission, $cmd, $this->ref_id, $this->type);
1401  $access = $this->checkCommandAccess($permission,$cmd,$this->ref_id,$this->type);
1402  $ilBench->stop("ilObjectListGUI", "4110_get_commands_check_access");
1403 
1404  if ($access)
1405  {
1406  $cmd_link = $this->getCommandLink($command["cmd"]);
1407  $cmd_frame = $this->getCommandFrame($command["cmd"]);
1408  $cmd_image = $this->getCommandImage($command["cmd"]);
1409  $access_granted = true;
1410  }
1411  else
1412  {
1413  $access_granted = false;
1414  $info_object = $ilAccess->getInfo();
1415  }
1416 
1417  if (!isset($command["default"]))
1418  {
1419  $command["default"] = "";
1420  }
1421  $ref_commands[] = array(
1422  "permission" => $permission,
1423  "cmd" => $cmd,
1424  "link" => $cmd_link,
1425  "frame" => $cmd_frame,
1426  "lang_var" => $lang_var,
1427  "txt" => $txt,
1428  "granted" => $access_granted,
1429  "access_info" => $info_object,
1430  "img" => $cmd_image,
1431  "default" => $command["default"]
1432  );
1433  }
1434 
1435  return $ref_commands;
1436  }
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.
$txt
Definition: error.php:12
Create styles array
The data for the language used.
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 3679 of file class.ilObjectListGUI.php.

References insertCommands().

3680  {
3681  return $this->insertCommands();
3682  }
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 605 of file class.ilObjectListGUI.php.

References $commands_enabled.

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

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

◆ getContainerObject()

ilObjectListGUI::getContainerObject ( )

◆ getCopyStatus()

ilObjectListGUI::getCopyStatus ( )
Parameters
bool
Returns
bool

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

References $copy_enabled.

518  {
519  return $this->copy_enabled;
520  }

◆ getCustomProperties()

ilObjectListGUI::getCustomProperties (   $a_prop)

get custom properties

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

Referenced by insertProperties().

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

◆ getCutStatus()

ilObjectListGUI::getCutStatus ( )
Parameters
bool
Returns
bool

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

496  {
497  return $this->cut_enabled;
498  }

◆ getDeleteStatus()

ilObjectListGUI::getDeleteStatus ( )
Parameters
bool
Returns
bool

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

474  {
475  return $this->delete_enabled;
476  }

◆ getDescription()

ilObjectListGUI::getDescription ( )

getDescription overwritten in class.ilObjLinkResourceList.php

Returns
string description

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

Referenced by insertDescription().

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

◆ getDescriptionStatus()

ilObjectListGUI::getDescriptionStatus ( )
Parameters
bool
Returns
bool

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

References $description_enabled.

Referenced by getListItemHTML().

297  {
299  }
+ Here is the caller graph for this function:

◆ getDetailsLevel()

ilObjectListGUI::getDetailsLevel ( )

Get current details level.

Returns

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

References $details_level.

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

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

◆ getDownloadCheckboxState()

ilObjectListGUI::getDownloadCheckboxState ( )

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

References $download_checkbox_state.

Referenced by insertIconsAndCheckboxes().

2879  {
2881  }
+ Here is the caller graph for this function:

◆ getExpandStatus()

ilObjectListGUI::getExpandStatus ( )

Is expand/collapse enabled.

Returns
boolean icons enabled?

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

References $expand_enabled.

Referenced by insertIconsAndCheckboxes().

429  {
430  return $this->expand_enabled;
431  }
+ Here is the caller graph for this function:

◆ getHeaderAction()

ilObjectListGUI::getHeaderAction ( )

Get header action.

Returns
string

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

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

2975  {
2976  global $ilUser, $lng, $tpl;
2977 
2978  $htpl = new ilTemplate("tpl.header_action.html", true, true, "Services/Repository");
2979 
2980  $redraw_js = "il.Object.redrawActionHeader();";
2981 
2982  // tags
2983  if($this->tags_enabled)
2984  {
2985  include_once("./Services/Tagging/classes/class.ilTagging.php");
2986  $tags = ilTagging::getTagsForUserAndObject($this->obj_id,
2987  ilObject::_lookupType($this->obj_id), 0, "", $ilUser->getId());
2988  if (count($tags) > 0)
2989  {
2990  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
2991  $lng->loadLanguageModule("tagging");
2992  /*$this->addHeaderIcon("tags",
2993  ilUtil::getImagePath("icon_tag.svg"),
2994  $lng->txt("tagging_tags").": ".count($tags),
2995  ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $redraw_js),
2996  count($tags));*/
2997 
2998  $f = $this->ui->factory();
2999  $this->addHeaderGlyph("tags", $f->glyph()->tag("#")
3000  ->withCounter($f->counter()->status((int) count($tags))),
3001  ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $redraw_js));
3002 
3003  }
3004  }
3005 
3006  // notes and comments
3007  $comments_enabled = $this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, true, false);
3008  if($this->notes_enabled || $comments_enabled)
3009  {
3010  include_once("./Services/Notes/classes/class.ilNote.php");
3011  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
3012  $cnt = ilNote::_countNotesAndComments($this->obj_id, $this->sub_obj_id);
3013 
3014  if($this->notes_enabled && $cnt[$this->obj_id][IL_NOTE_PRIVATE] > 0)
3015  {
3016  /*$this->addHeaderIcon("notes",
3017  ilUtil::getImagePath("note_unlabeled.svg"),
3018  $lng->txt("private_notes").": ".$cnt[$this->obj_id][IL_NOTE_PRIVATE],
3019  ilNoteGUI::getListNotesJSCall($this->ajax_hash, $redraw_js),
3020  $cnt[$this->obj_id][IL_NOTE_PRIVATE]
3021  );*/
3022 
3023  $f = $this->ui->factory();
3024  $this->addHeaderGlyph("notes", $f->glyph()->note("#")
3025  ->withCounter($f->counter()->status((int) $cnt[$this->obj_id][IL_NOTE_PRIVATE])),
3026  ilNoteGUI::getListNotesJSCall($this->ajax_hash, $redraw_js));
3027 
3028  }
3029 
3030  if($comments_enabled && $cnt[$this->obj_id][IL_NOTE_PUBLIC] > 0)
3031  {
3032  $lng->loadLanguageModule("notes");
3033 
3034  /*$this->addHeaderIcon("comments",
3035  ilUtil::getImagePath("comment_unlabeled.svg"),
3036  $lng->txt("notes_public_comments").": ".$cnt[$this->obj_id][IL_NOTE_PUBLIC],
3037  ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $redraw_js),
3038  $cnt[$this->obj_id][IL_NOTE_PUBLIC]);*/
3039 
3040  $f = $this->ui->factory();
3041  $this->addHeaderGlyph("comments", $f->glyph()->comment("#")
3042  ->withCounter($f->counter()->status((int) $cnt[$this->obj_id][IL_NOTE_PUBLIC])),
3043  ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $redraw_js));
3044 
3045  }
3046  }
3047 
3048  // rating
3049  if($this->rating_enabled)
3050  {
3051  include_once("./Services/Rating/classes/class.ilRatingGUI.php");
3052  $rating_gui = new ilRatingGUI();
3053  $rating_gui->enableCategories($this->rating_categories_enabled);
3054  // never rate sub objects from header action!
3055  $rating_gui->setObject($this->obj_id, $this->type);
3056  if($this->rating_text)
3057  {
3058  $rating_gui->setYourRatingText($this->rating_text);
3059  }
3060 
3061  $this->ctrl->setParameterByClass("ilRatingGUI", "cadh", $this->ajax_hash);
3062  $this->ctrl->setParameterByClass("ilRatingGUI", "rnsb", true);
3063  if($this->rating_ctrl_path)
3064  {
3065  $rating_gui->setCtrlPath($this->rating_ctrl_path);
3066  $ajax_url = $this->ctrl->getLinkTargetByClass($this->rating_ctrl_path, "saveRating", "", true, false);
3067  }
3068  else
3069  {
3070  // ???
3071  $ajax_url = $this->ctrl->getLinkTargetByClass("ilRatingGUI", "saveRating", "", true, false);
3072  }
3073  $tpl->addOnLoadCode("il.Object.setRatingUrl('".$ajax_url."');");
3074 
3075  $this->addHeaderIconHTML("rating",
3076  $rating_gui->getHtml(true,
3077  $this->checkCommandAccess("read", "", $this->ref_id, $this->type),
3078  "il.Object.saveRating(%rating%);"));
3079  }
3080 
3081  if($this->header_icons)
3082  {
3083  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
3084 
3085  $chunks = array();
3086  foreach($this->header_icons as $id => $attr)
3087  {
3088  $id = "headp_".$id;
3089 
3090  if(is_array($attr))
3091  {
3092  if($attr["glyph"])
3093  {
3094  if ($attr["onclick"])
3095  {
3096  $htpl->setCurrentBlock("prop_glyph_oc");
3097  $htpl->setVariable("GLYPH_ONCLICK", $attr["onclick"]);
3098  $htpl->parseCurrentBlock();
3099  }
3100  $renderer = $this->ui->renderer();
3101  $html = $renderer->render($attr["glyph"]);
3102  $htpl->setCurrentBlock("prop_glyph");
3103  $htpl->setVariable("GLYPH", $html);
3104  $htpl->parseCurrentBlock();
3105  }
3106  else
3107  {
3108  if ($attr["onclick"])
3109  {
3110  $htpl->setCurrentBlock("onclick");
3111  $htpl->setVariable("PROP_ONCLICK", $attr["onclick"]);
3112  $htpl->parseCurrentBlock();
3113  }
3114 
3115  if ($attr["status_text"])
3116  {
3117  $htpl->setCurrentBlock("status");
3118  $htpl->setVariable("PROP_TXT", $attr["status_text"]);
3119  $htpl->parseCurrentBlock();
3120  }
3121 
3122  if (!$attr["href"])
3123  {
3124  $attr["href"] = "#";
3125  }
3126 
3127  $htpl->setCurrentBlock("prop");
3128  $htpl->setVariable("PROP_ID", $id);
3129  $htpl->setVariable("IMG", ilUtil::img($attr["img"]));
3130  $htpl->setVariable("PROP_HREF", $attr["href"]);
3131  $htpl->parseCurrentBlock();
3132 
3133  if ($attr["tooltip"])
3134  {
3135  ilTooltipGUI::addTooltip($id, $attr["tooltip"]);
3136  }
3137  }
3138  }
3139  else
3140  {
3141  $chunks[] = $attr;
3142  }
3143  }
3144 
3145  if(sizeof($chunks))
3146  {
3147  $htpl->setVariable("PROP_CHUNKS",
3148  implode("   ", $chunks)."   ");
3149  }
3150  }
3151 
3152  $htpl->setVariable("ACTION_DROP_DOWN",
3153  $this->insertCommands(false, false, "", true));
3154 
3155  return $htpl->get();
3156  }
const IL_NOTE_PRIVATE
Definition: class.ilNote.php:4
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.
static getListNotesJSCall($a_hash, $a_update_code=null)
Get list notes js call.
global $tpl
Definition: ilias.php:8
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
special template class to simplify handling of ITX/PEAR
static getListTagsJSCall($a_hash, $a_update_code=null)
Get tagging js call.
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
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.
addHeaderGlyph($a_id, $a_glyph, $a_onclick=null)
global $lng
Definition: privfeed.php:17
insertCommands($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
insert all commands into html code
$html
Definition: example_001.php:87
+ 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 1446 of file class.ilObjectListGUI.php.

References $type.

Referenced by ilObjOrgUnitListGUI\insertIconsAndCheckboxes(), and insertIconsAndCheckboxes().

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

◆ getIconStatus()

ilObjectListGUI::getIconStatus ( )

Are icons enabled?

Returns
boolean icons enabled?

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

References $icons_enabled.

Referenced by insertIconsAndCheckboxes().

389  {
390  return $this->icons_enabled;
391  }
+ Here is the caller graph for this function:

◆ getInfoScreenStatus()

ilObjectListGUI::getInfoScreenStatus ( )
Parameters
bool
Returns
bool

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

References $info_screen_enabled.

Referenced by insertCommands().

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

◆ getItemDetailLinkStatus()

ilObjectListGUI::getItemDetailLinkStatus ( )

get item detail link status

public

Returns
bool

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

References $item_detail_links_enabled.

Referenced by getListItemHTML().

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

◆ getLinkStatus()

ilObjectListGUI::getLinkStatus ( )
Parameters
bool
Returns
bool

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

562  {
563  return $this->link_enabled;
564  }

◆ 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 = "" 
)

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 3434 of file class.ilObjectListGUI.php.

References $ilBench, $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(), resetCustomData(), setAjaxHash(), storeAccessCache(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ilCommonActionDispatcherGUI\TYPE_WORKSPACE.

3436  {
3437  global $ilBench, $ilUser;
3438 
3439  // this variable stores wheter any admin commands
3440  // are included in the output
3441  $this->adm_commands_included = false;
3442 
3443  // only for permformance exploration
3444  $type = ilObject::_lookupType($a_obj_id);
3445 
3446  // initialization
3447  $ilBench->start("ilObjectListGUI", "1000_getListHTML_init$type");
3448  $this->initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
3449  $ilBench->stop("ilObjectListGUI", "1000_getListHTML_init$type");
3450 
3451  // prepare ajax calls
3452  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
3453  if($this->context == self::CONTEXT_REPOSITORY)
3454  {
3456  }
3457  else
3458  {
3460  }
3461  $this->setAjaxHash(ilCommonActionDispatcherGUI::buildAjaxHash($node_type, $a_ref_id, $type, $a_obj_id));
3462 
3463  if ($a_use_asynch && $a_get_asynch_commands)
3464  {
3465  return $this->insertCommands(true, true);
3466  }
3467 
3468  if($this->rating_enabled)
3469  {
3470  if(ilRating::hasRatingInListGUI($this->obj_id, $this->type))
3471  {
3472  $may_rate = $this->checkCommandAccess("read", "", $this->ref_id, $this->type);
3473 
3474  $rating = new ilRatingGUI();
3475  $rating->setObject($this->obj_id, $this->type);
3476 /* $this->addCustomProperty(
3477  $this->lng->txt("rating_average_rating"),
3478  $rating->getListGUIProperty($this->ref_id, $may_rate, $this->ajax_hash, $this->parent_ref_id),
3479  false,
3480  true
3481  );*/
3482  $this->addCustomProperty(
3483  "",
3484  $rating->getListGUIProperty($this->ref_id, $may_rate, $this->ajax_hash, $this->parent_ref_id),
3485  false,
3486  true
3487  );
3488  }
3489  }
3490 
3491  // read from cache
3492  include_once("Services/Object/classes/class.ilListItemAccessCache.php");
3493  $this->acache = new ilListItemAccessCache();
3494  $cres = $this->acache->getEntry($ilUser->getId().":".$a_ref_id);
3495  if($this->acache->getLastAccessStatus() == "hit")
3496  {
3497  $this->access_cache = unserialize($cres);
3498  }
3499  else
3500  {
3501  // write to cache
3502  $this->storeAccessCache();
3503  }
3504 
3505  // visible check
3506  if (!$this->checkCommandAccess("visible", "", $a_ref_id, "", $a_obj_id))
3507  {
3508  $ilBench->stop("ilObjectListGUI", "2000_getListHTML_check_visible");
3509  $this->resetCustomData();
3510  return "";
3511  }
3512 
3513  // BEGIN WEBDAV
3514  if($type=='file' AND ilObjFileAccess::_isFileHidden($a_title))
3515  {
3516  $this->resetCustomData();
3517  return "";
3518  }
3519  // END WEBDAV
3520 
3521 
3522  $this->tpl = new ilTemplate(static::$tpl_file_name, true, true,
3523  static::$tpl_component, "DEFAULT", false, true);
3524 
3525  if($this->getCommandsStatus())
3526  {
3527  if (!$this->getSeparateCommands())
3528  {
3529  $this->tpl->setVariable("COMMAND_SELECTION_LIST",
3530  $this->insertCommands($a_use_asynch, $a_get_asynch_commands, $a_asynch_url));
3531  }
3532  }
3533 
3534  if($this->getProgressInfoStatus())
3535  {
3536  $this->insertProgressInfo();
3537  }
3538 
3539  // insert title and describtion
3540  $this->insertTitle();
3541  if (!$this->isMode(IL_LIST_AS_TRIGGER))
3542  {
3543  if ($this->getDescriptionStatus())
3544  {
3545  $this->insertDescription();
3546  }
3547  }
3548 
3549  if($this->getSearchFragmentStatus())
3550  {
3551  $this->insertSearchFragment();
3552  }
3553  if($this->enabledRelevance())
3554  {
3555  $this->insertRelevance();
3556  }
3557 
3558  // properties
3559  $ilBench->start("ilObjectListGUI", "6000_insert_properties$type");
3560  if ($this->getPropertiesStatus())
3561  {
3562  $this->insertProperties();
3563  }
3564  $ilBench->stop("ilObjectListGUI", "6000_insert_properties$type");
3565 
3566  // notice properties
3567  $ilBench->start("ilObjectListGUI", "6500_insert_notice_properties$type");
3568  if($this->getNoticePropertiesStatus())
3569  {
3570  $this->insertNoticeProperties();
3571  }
3572  $ilBench->stop("ilObjectListGUI", "6500_insert_notice_properties$type");
3573 
3574  // preconditions
3575  $ilBench->start("ilObjectListGUI", "7000_insert_preconditions");
3576  if ($this->getPreconditionsStatus())
3577  {
3578  $this->insertPreconditions();
3579  }
3580  $ilBench->stop("ilObjectListGUI", "7000_insert_preconditions");
3581 
3582  // path
3583  $ilBench->start("ilObjectListGUI", "8000_insert_path");
3584  $this->insertPath();
3585  $ilBench->stop("ilObjectListGUI", "8000_insert_path");
3586 
3587  $ilBench->start("ilObjectListGUI", "8500_item_detail_links");
3588  if($this->getItemDetailLinkStatus())
3589  {
3590  $this->insertItemDetailLinks();
3591  }
3592  $ilBench->stop("ilObjectListGUI", "8500_item_detail_links");
3593 
3594  // icons and checkboxes
3595  $this->insertIconsAndCheckboxes();
3596 
3597  // input field for position
3598  $this->insertPositionField();
3599 
3600  // subitems
3601  $this->insertSubItems();
3602 
3603  // file upload
3604  if ($this->isFileUploadAllowed())
3605  {
3606  $this->insertFileUpload();
3607  }
3608 
3609  $this->resetCustomData();
3610 
3611  $this->tpl->setVariable("DIV_CLASS",'ilContainerListItemOuter');
3612  $this->tpl->setVariable("DIV_ID", 'id = "'.$this->getUniqueItemId(true).'"');
3613  $this->tpl->setVariable("ADDITIONAL", $this->getAdditionalInformation());
3614 
3615  // #11554 - make sure that internal ids are reset
3616  $this->ctrl->setParameter($this->getContainerObject(), "item_ref_id", "");
3617 
3618  return $this->tpl->get();
3619  }
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. ...
resetCustomData()
reset properties and commands
getAdditionalInformation()
Get additional information.
getItemDetailLinkStatus()
get item detail link status
static hasRatingInListGUI($a_obj_id, $a_obj_type)
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
insertProperties()
insert properties
insertSubItems()
Insert subitems.
enabledRelevance()
enabled relevance
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
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
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
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
inititialize new item (is called by getItemHTML())
insertDescription()
insert item description
insertFileUpload()
Inserts a file upload component.
insertRelevance()
insert relevance
+ 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 1691 of file class.ilObjectListGUI.php.

1692  {
1693  return $this->mode;
1694  }

◆ getNoticeProperties()

ilObjectListGUI::getNoticeProperties ( )

get notice properties

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

References $info, and array.

Referenced by insertNoticeProperties().

1307  {
1308  $this->notice_prop = array();
1309  if($infos = $this->ldap_mapping->getInfoStrings($this->obj_id,true))
1310  {
1311  foreach($infos as $info)
1312  {
1313  $this->notice_prop[] = array('value' => $info);
1314  }
1315  }
1316  return $this->notice_prop ? $this->notice_prop : array();
1317  }
$info
Definition: example_052.php:80
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getNoticePropertiesStatus()

ilObjectListGUI::getNoticePropertiesStatus ( )

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

References $notice_properties_enabled.

Referenced by getListItemHTML().

252  {
254  }
+ Here is the caller graph for this function:

◆ getPathStatus()

ilObjectListGUI::getPathStatus ( )
Parameters
bool
Returns
bool

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

Referenced by insertPath().

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

◆ getPreconditionsStatus()

ilObjectListGUI::getPreconditionsStatus ( )
Parameters
bool
Returns
bool

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

References $preconditions_enabled.

Referenced by getListItemHTML().

275  {
277  }
+ Here is the caller graph for this function:

◆ getProgressInfoStatus()

ilObjectListGUI::getProgressInfoStatus ( )

get progress info status

public

Parameters

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

References $progress_enabled.

Referenced by getListItemHTML().

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

◆ getProperties()

ilObjectListGUI::getProperties ( )

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 1159 of file class.ilObjectListGUI.php.

References $lng, ilDAVActivationChecker\_isActive(), array, and getDetailsLevel().

Referenced by getAlertProperties(), ilObjForumListGUI\init(), ilObjChatroomListGUI\init(), and insertProperties().

1160  {
1161  global $objDefinition;
1162 
1163  $props = array();
1164  // please list alert properties first
1165  // example (use $lng->txt instead of "Status"/"Offline" strings):
1166  // $props[] = array("alert" => true, "property" => "Status", "value" => "Offline");
1167  // $props[] = array("alert" => false, "property" => ..., "value" => ...);
1168  // ...
1169 
1170  // #8280: WebDav is only supported in repository
1171  if($this->context == self::CONTEXT_REPOSITORY)
1172  {
1173  // BEGIN WebDAV Display locking information
1174  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1176  {
1177  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
1178  global $ilias, $lng;
1179 
1180  // Show lock info
1181  require_once('Services/WebDAV/classes/class.ilDAVLocks.php');
1182  $davLocks = new ilDAVLocks();
1183  if ($ilias->account->getId() != ANONYMOUS_USER_ID)
1184  {
1185  $locks =& $davLocks->getLocksOnObjectObj($this->obj_id);
1186  if (count($locks) > 0)
1187  {
1188  $lockUser = new ilObjUser($locks[0]['ilias_owner']);
1189 
1190  $props[] = array(
1191  "alert" => false,
1192  "property" => $lng->txt("in_use_by"),
1193  "value" => $lockUser->getLogin(),
1194  "link" => "./ilias.php?user=".$locks[0]['ilias_owner'].'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI',
1195  );
1196  }
1197  }
1198  // END WebDAV Display locking information
1199 
1200  if($this->getDetailsLevel() == self::DETAILS_SEARCH)
1201  {
1202  return $props;
1203  }
1204 
1205  // BEGIN WebDAV Display warning for invisible Unix files and files with special characters
1206  if (preg_match('/^(\\.|\\.\\.)$/', $this->title))
1207  {
1208  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1209  "value" => $lng->txt("filename_special_filename"),
1210  'propertyNameVisible' => false);
1211  }
1212  else if (preg_match('/^\\./', $this->title))
1213  {
1214  $props[] = array("alert" => false, "property" => $lng->txt("filename_visibility"),
1215  "value" => $lng->txt("filename_hidden_unix_file"),
1216  'propertyNameVisible' => false);
1217  }
1218  else if (preg_match('/~$/', $this->title))
1219  {
1220  $props[] = array("alert" => false, "property" => $lng->txt("filename_visibility"),
1221  "value" => $lng->txt("filename_hidden_backup_file"),
1222  'propertyNameVisible' => false);
1223  }
1224  else if (preg_match('/[\\/]/', $this->title))
1225  {
1226  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1227  "value" => $lng->txt("filename_special_characters"),
1228  'propertyNameVisible' => false);
1229  }
1230  else if (preg_match('/[\\\\\\/:*?"<>|]/', $this->title))
1231  {
1232  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1233  "value" => $lng->txt("filename_windows_special_characters"),
1234  'propertyNameVisible' => false);
1235  }
1236  else if (preg_match('/\\.$/', $this->title))
1237  {
1238  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1239  "value" => $lng->txt("filename_windows_empty_extension"),
1240  'propertyNameVisible' => false);
1241  }
1242  else if (preg_match('/^(\\.|\\.\\.)$/', $this->title))
1243  {
1244  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1245  "value" => $lng->txt("filename_special_filename"),
1246  'propertyNameVisible' => false);
1247  }
1248  else if (preg_match('/#/', $this->title))
1249  {
1250  $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"),
1251  "value" => $lng->txt("filename_windows_webdav_issue"),
1252  'propertyNameVisible' => false);
1253  }
1254  }
1255  // END WebDAV Display warning for invisible files and files with special characters
1256  }
1257 
1258  return $props;
1259  }
static _isActive()
Static getter.
getDetailsLevel()
Get current details level.
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17
+ 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 234 of file class.ilObjectListGUI.php.

References $properties_enabled.

Referenced by getListItemHTML().

235  {
237  }
+ Here is the caller graph for this function:

◆ getRelevance()

ilObjectListGUI::getRelevance ( )

get relevance

Parameters

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

References $relevance.

Referenced by insertRelevance().

369  {
370  return $this->relevance;
371  }
+ Here is the caller graph for this function:

◆ getSearchFragment()

ilObjectListGUI::getSearchFragment ( )

get search fragment

Returns

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

References $search_fragment.

Referenced by insertSearchFragment().

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

◆ getSearchFragmentStatus()

ilObjectListGUI::getSearchFragmentStatus ( )

Show hide search result fragments.

Parameters
bool
Returns
bool

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

References $search_fragment_enabled.

Referenced by getListItemHTML().

308  {
310  }
+ Here is the caller graph for this function:

◆ getSeparateCommands()

ilObjectListGUI::getSeparateCommands ( )

Get separate commands.

Returns
boolean separate commands

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

References $separate_commands.

Referenced by getListItemHTML().

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

◆ getSubscribeStatus()

ilObjectListGUI::getSubscribeStatus ( )
Parameters
bool
Returns
bool

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

540  {
541  return $this->subscribe_enabled;
542  }

◆ getSubstitutionStatus()

ilObjectListGUI::getSubstitutionStatus ( )

Get substitution status.

public

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

References $substitutions_enabled.

Referenced by insertDescription().

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

◆ getTitle()

ilObjectListGUI::getTitle ( )

getTitle overwritten in class.ilObjLinkResourceList.php

Returns
string title

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

References $title.

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

775  {
776  return $this->title;
777  }
+ 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 3649 of file class.ilObjectListGUI.php.

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

3650  {
3651  // use correct id for references
3652  $id_ref = ($this->reference_ref_id > 0)
3653  ? $this->reference_ref_id
3654  : $this->ref_id;
3655 
3656  // add unique identifier for preconditions (objects can appear twice in same container)
3657  if($this->condition_depth)
3658  {
3659  $id_ref .= "_pc".$this->condition_depth;
3660  }
3661 
3662  // unique
3663  $id_ref .= "_pref_".$this->parent_ref_id;
3664 
3665  if(!$a_as_div)
3666  {
3667  return $id_ref;
3668  }
3669  else
3670  {
3671  // action menu [yellow] toggle
3672  return "lg_div_".$id_ref;
3673  }
3674  }
+ Here is the caller graph for this function:

◆ init()

ilObjectListGUI::init ( )

initialisation

this method should be overwritten by derived classes

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

References ilObjectAccess\_getCommands().

Referenced by __construct().

196  {
197  // Create static links for default command (linked title) or not
198  $this->static_link_enabled = true;
199  $this->delete_enabled = true;
200  $this->cut_enabled = true;
201  $this->subscribe_enabled = true;
202  $this->link_enabled = false;
203  $this->copy_enabled = false;
204  $this->progress_enabled = false;
205  $this->notice_properties_enabled = true;
206  $this->info_screen_enabled = false;
207  $this->type = ""; // "cat", "course", ...
208  $this->gui_class_name = ""; // "ilobjcategorygui", "ilobjcoursegui", ...
209 
210  // general commands array, e.g.
211  include_once('./Services/Object/classes/class.ilObjectAccess.php');
212  $this->commands = ilObjectAccess::_getCommands();
213  }
static _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 = "" 
)

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 968 of file class.ilObjectListGUI.php.

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

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

969  {
970  $this->offline_mode = false;
971  if ($this->type == "sahs") {
972  include_once('Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php');
973  $this->offline_mode = ilObjSAHSLearningModuleAccess::_lookupUserIsOfflineMode($a_obj_id);
974  }
975  $this->access_cache = array();
976  $this->ref_id = $a_ref_id;
977  $this->obj_id = $a_obj_id;
978  $this->setTitle($a_title);
979  $this->setDescription($a_description);
980  #$this->description = $a_description;
981 
982  // checks, whether any admin commands are included in the output
983  $this->adm_commands_included = false;
984  $this->prevent_access_caching = false;
985 
986  }
static _lookupUserIsOfflineMode($a_obj_id)
Checks offlineMode and returns false if.
setDescription($a_description)
Create styles array
The data for the language used.
+ 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 2100 of file class.ilObjectListGUI.php.

References ilFolderDownloadBackgroundTaskHandler\getObjectListAction(), and ilFolderDownloadBackgroundTaskHandler\isActive().

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

2101  {
2102  // #11099
2103  $chksum = md5($a_href.$a_text);
2104  if($a_href == "#" ||
2105  !in_array($chksum, $this->prevent_duplicate_commands))
2106  {
2107  if($a_href != "#")
2108  {
2109  $this->prevent_duplicate_commands[] = $chksum;
2110  }
2111 
2112  $prevent_background_click = false;
2113  if ($a_cmd == 'mount_webfolder')
2114  {
2115  $prevent_background_click = true;
2116  }
2117 
2118  if ($a_cmd == "downloadFolder")
2119  {
2120  include_once "Services/BackgroundTask/classes/class.ilFolderDownloadBackgroundTaskHandler.php";
2122  {
2124  $a_href = "#";
2125  }
2126  }
2127 
2128  $this->current_selection_list->addItem($a_text, "", $a_href, $a_img, $a_text, $a_frame,
2129  "", $prevent_background_click, $a_onclick);
2130  }
2131  }
static isActive()
Is folder background download active?
static getObjectListAction($a_ref_id)
Get object list action.
+ Here is the call graph for this function:
+ 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 2534 of file class.ilObjectListGUI.php.

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

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

2536  {
2537  global $lng, $ilUser;
2538 
2539  if (!$this->getCommandsStatus())
2540  {
2541  return;
2542  }
2543 
2544  include_once("Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2545  $this->current_selection_list = new ilAdvancedSelectionListGUI();
2546  $this->current_selection_list->setAsynch($a_use_asynch && !$a_get_asynch_commands);
2547  $this->current_selection_list->setAsynchUrl($a_asynch_url);
2548  if ($a_header_actions)
2549  {
2550  $this->current_selection_list->setListTitle("<span class='hidden-xs'>".$lng->txt("actions")."</span>");
2551  }
2552  else
2553  {
2554  $this->current_selection_list->setListTitle("");
2555  }
2556  $this->current_selection_list->setId("act_".$this->getUniqueItemId(false));
2557  $this->current_selection_list->setSelectionHeaderClass("small");
2558  $this->current_selection_list->setItemLinkClass("xsmall");
2559  $this->current_selection_list->setLinksMode("il_ContainerItemCommand2");
2560  $this->current_selection_list->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
2561  $this->current_selection_list->setUseImages(false);
2562  $this->current_selection_list->setAdditionalToggleElement($this->getUniqueItemId(true), "ilContainerListItemOuterHighlight");
2563 
2564  $this->ctrl->setParameterByClass($this->gui_class_name, "ref_id", $this->ref_id);
2565 
2566  // only standard command?
2567  $only_default = false;
2568  if ($a_use_asynch && !$a_get_asynch_commands)
2569  {
2570  $only_default = true;
2571  }
2572 
2573  $this->default_command = false;
2574  $this->prevent_duplicate_commands = array();
2575 
2576  // we only allow the following commands inside the header actions
2577  $valid_header_commands = array("mount_webfolder");
2578 
2579  $commands = $this->getCommands($this->ref_id, $this->obj_id);
2580  foreach($commands as $command)
2581  {
2582  if($a_header_actions && !in_array($command["cmd"], $valid_header_commands))
2583  {
2584  continue;
2585  }
2586 
2587  if ($command["granted"] == true )
2588  {
2589  if (!$command["default"] === true)
2590  {
2591  if (!$this->std_cmd_only && !$only_default)
2592  {
2593  // workaround for repository frameset
2594  $command["link"] =
2595  $this->appendRepositoryFrameParameter($command["link"]);
2596 
2597  $cmd_link = $command["link"];
2598  $txt = ($command["lang_var"] == "")
2599  ? $command["txt"]
2600  : $this->lng->txt($command["lang_var"]);
2601  $this->insertCommand($cmd_link, $txt,
2602  $command["frame"], $command["img"], $command["cmd"]);
2603  }
2604  }
2605  else
2606  {
2607  $this->default_command = $this->createDefaultCommand($command);
2608  //$this->default_command = $command;
2609  }
2610  }
2611  elseif($command["default"] === true)
2612  {
2613  $items =& $command["access_info"];
2614  foreach ($items as $item)
2615  {
2616  if ($item["type"] == IL_NO_LICENSE)
2617  {
2618  $this->addCustomProperty($this->lng->txt("license"),$item["text"],true);
2619  $this->enableProperties(true);
2620  break;
2621  }
2622  }
2623  }
2624  }
2625 
2626  if (!$only_default)
2627  {
2628  // custom commands
2629  if (is_array($this->cust_commands))
2630  {
2631  foreach ($this->cust_commands as $command)
2632  {
2633  $this->insertCommand($command["link"], $this->lng->txt($command["lang_var"]),
2634  $command["frame"], "", $command["cmd"], $command["onclick"]);
2635  }
2636  }
2637 
2638  // info screen commmand
2639  if ($this->getInfoScreenStatus())
2640  {
2641  $this->insertInfoScreenCommand();
2642  }
2643 
2644  if (!$this->isMode(IL_LIST_AS_TRIGGER))
2645  {
2646  // edit timings
2647  if($this->timings_enabled)
2648  {
2649  $this->insertTimingsCommand();
2650  }
2651 
2652  // delete
2653  if ($this->delete_enabled)
2654  {
2655  $this->insertDeleteCommand();
2656  }
2657 
2658  // link
2659  if ($this->link_enabled)
2660  {
2661  $this->insertLinkCommand();
2662  }
2663 
2664  // cut
2665  if ($this->cut_enabled)
2666  {
2667  $this->insertCutCommand();
2668  }
2669 
2670  // copy
2671  if ($this->copy_enabled)
2672  {
2673  $this->insertCopyCommand();
2674  }
2675 
2676  // cut/copy from workspace to repository
2677  if ($this->repository_transfer_enabled)
2678  {
2679  $this->insertCutCommand(true);
2680  $this->insertCopyCommand(true);
2681  }
2682 
2683  // subscribe
2684  if ($this->subscribe_enabled)
2685  {
2686  $this->insertSubscribeCommand();
2687  }
2688 
2689  // multi download
2690  if ($this->multi_download_enabled && $a_header_actions)
2691  {
2692  $this->insertMultiDownloadCommand();
2693  }
2694 
2695  // BEGIN PATCH Lucene search
2696  if($this->cut_enabled or $this->link_enabled)
2697  {
2698  $this->insertPasteCommand();
2699  }
2700  // END PATCH Lucene Search
2701  }
2702  }
2703 
2704  // common social commands (comment, notes, tags)
2705  if (!$only_default && !$this->isMode(IL_LIST_AS_TRIGGER))
2706  {
2707  $this->insertCommonSocialCommands($a_header_actions);
2708  }
2709 
2710  if(!$a_header_actions)
2711  {
2712  $this->ctrl->clearParametersByClass($this->gui_class_name);
2713  }
2714 
2715  // fix bug #12417
2716  // there is one case, where no action menu should be displayed:
2717  // public area, category, no info tab
2718  // todo: make this faster and remove type specific implementation if possible
2719  if ($a_use_asynch && !$a_get_asynch_commands && !$a_header_actions)
2720  {
2721  if ($ilUser->getId() == ANONYMOUS_USER_ID && $this->type == "cat")
2722  {
2723  include_once("./Services/Container/classes/class.ilContainer.php");
2724  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
2726  $this->obj_id,
2728  true))
2729  {
2730  return;
2731  }
2732  }
2733  }
2734 
2735  if ($a_use_asynch && $a_get_asynch_commands)
2736  {
2737  return $this->current_selection_list->getHTML(true);
2738  }
2739 
2740  return $this->current_selection_list->getHTML();
2741  }
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
insertInfoScreenCommand()
insert info screen command
$ilUser
Definition: imgupload.php:18
$txt
Definition: error.php:12
Create styles array
The data for the language used.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
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.
insertTimingsCommand()
insert edit timings command
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
global $lng
Definition: privfeed.php:17
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 2438 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().

2439  {
2440  global $ilSetting, $lng, $ilUser, $tpl;
2441 
2442  if ($this->std_cmd_only ||
2443  ($ilUser->getId() == ANONYMOUS_USER_ID))
2444  {
2445  return;
2446  }
2447  $lng->loadLanguageModule("notes");
2448  $lng->loadLanguageModule("tagging");
2449  $cmd_link = $this->getCommandLink("infoScreen")."#notes_top";
2450  $cmd_tag_link = $this->getCommandLink("infoScreen");
2451  $cmd_frame = $this->getCommandFrame("infoScreen");
2452  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
2453 
2454  // reference objects have translated ids, revert to originals
2455  $note_ref_id = $this->ref_id;
2456  if($this->reference_ref_id)
2457  {
2458  $note_ref_id = $this->reference_ref_id;
2459  }
2460 
2461  $js_updater = $a_header_actions
2462  ? "il.Object.redrawActionHeader();"
2463  : "il.Object.redrawListItem(".$note_ref_id.")";
2464 
2465  $comments_enabled = $this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, $a_header_actions, true);
2466  if($comments_enabled)
2467  {
2468  $this->insertCommand("#", $this->lng->txt("notes_comments"), $cmd_frame,
2469  "", "", ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $js_updater));
2470  }
2471 
2472  if($this->notes_enabled)
2473  {
2474  $this->insertCommand("#", $this->lng->txt("notes"), $cmd_frame,
2475  "", "", ilNoteGUI::getListNotesJSCall($this->ajax_hash, $js_updater));
2476  }
2477 
2478  if ($this->tags_enabled)
2479  {
2480  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
2481  //$this->insertCommand($cmd_tag_link, $this->lng->txt("tagging_set_tag"), $cmd_frame);
2482  $this->insertCommand("#", $this->lng->txt("tagging_set_tag"), $cmd_frame,
2483  "", "", ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $js_updater));
2484  }
2485  }
getCommandLink($a_cmd)
Get command link url.
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
static getListNotesJSCall($a_hash, $a_update_code=null)
Get list notes js call.
global $tpl
Definition: ilias.php:8
getCommandFrame($a_cmd)
Get command target frame.
static getListTagsJSCall($a_hash, $a_update_code=null)
Get tagging js call.
$ilUser
Definition: imgupload.php:18
static getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
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:17
global $lng
Definition: privfeed.php:17
+ 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 2282 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2283  {
2284  global $objDefinition;
2285 
2286  if($this->std_cmd_only)
2287  {
2288  return;
2289  }
2290 
2291  if($this->checkCommandAccess('copy', 'copy', $this->ref_id, $this->type) &&
2292  $objDefinition->allowCopy($this->type))
2293  {
2294  if($this->context != self::CONTEXT_WORKSPACE && $this->context != self::CONTEXT_WORKSPACE_SHARING)
2295  {
2296  $this->ctrl->setParameterByClass('ilobjectcopygui','source_id',$this->getCommandId());
2297  $cmd_copy = $this->ctrl->getLinkTargetByClass('ilobjectcopygui','initTargetSelection');
2298  $this->insertCommand($cmd_copy, $this->lng->txt('copy'));
2299  }
2300  else
2301  {
2302  $this->ctrl->setParameter($this->container_obj, "ref_id",
2303  $this->container_obj->object->getRefId());
2304  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2305 
2306  if(!$a_to_repository)
2307  {
2308  $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj, 'copy');
2309  $this->insertCommand($cmd_copy, $this->lng->txt('copy'));
2310  }
2311  else
2312  {
2313  $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj, 'copy_to_repository');
2314  $this->insertCommand($cmd_copy, $this->lng->txt('wsp_copy_to_repository'));
2315  }
2316  }
2317 
2318  $this->adm_commands_included = true;
2319  }
2320  return;
2321  }
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 2227 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2228  {
2229  global $ilAccess;
2230 
2231  if ($this->std_cmd_only)
2232  {
2233  return;
2234  }
2235  // BEGIN PATCH Lucene search
2236  if(is_object($this->getContainerObject()) and
2238  {
2239  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type))
2240  {
2241  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2242  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "cut");
2243  $this->insertCommand($cmd_link, $this->lng->txt("move"));
2244  $this->adm_commands_included = true;
2245  return true;
2246  }
2247  return false;
2248  }
2249  // END PATCH Lucene Search
2250 
2251  // if the permission is changed here, it has
2252  // also to be changed in ilContainerContentGUI, determineAdminCommands
2253  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type) &&
2254  $this->container_obj->object)
2255  {
2256  $this->ctrl->setParameter($this->container_obj, "ref_id",
2257  $this->container_obj->object->getRefId());
2258  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2259 
2260  if(!$a_to_repository)
2261  {
2262  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "cut");
2263  $this->insertCommand($cmd_link, $this->lng->txt("move"), "",
2264  "");
2265  }
2266  else
2267  {
2268  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "cut_for_repository");
2269  $this->insertCommand($cmd_link, $this->lng->txt("wsp_move_to_repository"), "",
2270  "");
2271  }
2272 
2273  $this->adm_commands_included = true;
2274  }
2275  }
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.
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 2140 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2141  {
2142  if ($this->std_cmd_only)
2143  {
2144  return;
2145  }
2146 
2147  if(is_object($this->getContainerObject()) and
2149  {
2150  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type))
2151  {
2152  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2153  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "delete");
2154  $this->insertCommand($cmd_link, $this->lng->txt("delete"));
2155  $this->adm_commands_included = true;
2156  return true;
2157  }
2158  return false;
2159  }
2160 
2161  if($this->checkCommandAccess('delete','',$this->ref_id,$this->type))
2162  {
2163  $this->ctrl->setParameter($this->container_obj, "ref_id",
2164  $this->container_obj->object->getRefId());
2165  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2166  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "delete");
2167  $this->insertCommand($cmd_link, $this->lng->txt("delete"), "",
2168  "");
2169  $this->adm_commands_included = true;
2170  }
2171  }
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.
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 1620 of file class.ilObjectListGUI.php.

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

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

1621  {
1622  if($this->getSubstitutionStatus())
1623  {
1624  $this->insertSubstitutions();
1625  if(!$this->substitutions->isDescriptionEnabled())
1626  {
1627  return true;
1628  }
1629  }
1630 
1631  // see bug #16519
1632  $d = $this->getDescription();
1633  $d = strip_tags($d, "<b>");
1634  $this->tpl->setCurrentBlock("item_description");
1635  $this->tpl->setVariable("TXT_DESC", $d);
1636  $this->tpl->parseCurrentBlock();
1637  }
getDescription()
getDescription overwritten in class.ilObjLinkResourceList.php
getSubstitutionStatus()
Get substitution status.
for($col=0; $col< 50; $col++) $d
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 3849 of file class.ilObjectListGUI.php.

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

Referenced by getListItemHTML().

3850  {
3851  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
3853 
3854  $upload = new ilFileUploadGUI($this->getUniqueItemId(true), $this->ref_id);
3855 
3856  $this->tpl->setCurrentBlock("fileupload");
3857  $this->tpl->setVariable("FILE_UPLOAD", $upload->getHTML());
3858  $this->tpl->parseCurrentBlock();
3859  }
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 3274 of file class.ilObjectListGUI.php.

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

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

3275  {
3276  global $lng, $objDefinition;
3277 
3278  $cnt = 0;
3279  if ($this->getCheckboxStatus())
3280  {
3281  $this->tpl->setCurrentBlock("check");
3282  $this->tpl->setVariable("VAL_ID", $this->getCommandId());
3283  $this->tpl->parseCurrentBlock();
3284  $cnt += 1;
3285  }
3286  else if ($this->getDownloadCheckboxState() != self::DOWNLOAD_CHECKBOX_NONE)
3287  {
3288  $this->tpl->setCurrentBlock("check_download");
3289  if ($this->getDownloadCheckboxState() == self::DOWNLOAD_CHECKBOX_ENABLED)
3290  $this->tpl->setVariable("VAL_ID", $this->getCommandId());
3291  else
3292  $this->tpl->setVariable("VAL_VISIBILITY", "visibility: hidden;\" disabled=\"disabled");
3293  $this->tpl->parseCurrentBlock();
3294  $cnt += 1;
3295  }
3296  elseif($this->getExpandStatus())
3297  {
3298  $this->tpl->setCurrentBlock('expand');
3299 
3300  if($this->isExpanded())
3301  {
3302  $this->ctrl->setParameter($this->container_obj,'expand',-1 * $this->obj_id);
3303  // "view" added, see #19922
3304  $this->tpl->setVariable('EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj,'view',$this->getUniqueItemId(true)));
3305  $this->ctrl->clearParameters($this->container_obj);
3306  $this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('tree_exp.svg'));
3307  $this->tpl->setVariable('EXP_ALT',$this->lng->txt('collapse'));
3308  }
3309  else
3310  {
3311  $this->ctrl->setParameter($this->container_obj,'expand',$this->obj_id);
3312  // "view" added, see #19922
3313  $this->tpl->setVariable('EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj,'view',$this->getUniqueItemId(true)));
3314  $this->ctrl->clearParameters($this->container_obj);
3315  $this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('tree_col.svg'));
3316  $this->tpl->setVariable('EXP_ALT',$this->lng->txt('expand'));
3317  }
3318 
3319  $this->tpl->parseCurrentBlock();
3320  $cnt += 1;
3321  }
3322 
3323  if ($this->getIconStatus())
3324  {
3325  if ($cnt == 1)
3326  {
3327  $this->tpl->touchBlock("i_1"); // indent
3328  }
3329 
3330  // icon link
3331  if ($this->title_link_disabled || !$this->default_command || (!$this->getCommandsStatus() && !$this->restrict_to_goto))
3332  {
3333  }
3334  else
3335  {
3336  $this->tpl->setCurrentBlock("icon_link_s");
3337 
3338  if ($this->default_command["frame"] != "")
3339  {
3340  $this->tpl->setVariable("ICON_TAR", "target='".$this->default_command["frame"]."'");
3341  }
3342 
3343  $this->tpl->setVariable("ICON_HREF",
3344  $this->default_command["link"]);
3345  $this->tpl->parseCurrentBlock();
3346  $this->tpl->touchBlock("icon_link_e");
3347  }
3348 
3349  $this->tpl->setCurrentBlock("icon");
3350  if (!$objDefinition->isPlugin($this->getIconImageType()))
3351  {
3352  $this->tpl->setVariable("ALT_ICON", $lng->txt("icon")." ".$lng->txt("obj_".$this->getIconImageType()));
3353  }
3354  else
3355  {
3356  include_once("Services/Component/classes/class.ilPlugin.php");
3357  $this->tpl->setVariable("ALT_ICON", $lng->txt("icon")." ".
3359  }
3360 
3361  $this->tpl->setVariable("SRC_ICON",
3362  ilObject::_getIcon($this->obj_id, "small", $this->getIconImageType()));
3363  $this->tpl->parseCurrentBlock();
3364  $cnt += 1;
3365  }
3366 
3367  $this->tpl->touchBlock("d_".$cnt); // indent main div
3368  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
getIconStatus()
Are icons enabled?
static lookupTxtById($plugin_id, $lang_var)
getCheckboxStatus()
Are checkboxes enabled?
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:17
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 2420 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2421  {
2422  if ($this->std_cmd_only)
2423  {
2424  return;
2425  }
2426  $cmd_link = $this->getCommandLink("infoScreen");
2427  $cmd_frame = $this->getCommandFrame("infoScreen");
2428  $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame,
2429  ilUtil::getImagePath("icon_info.svg"));
2430  }
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 732 of file class.ilObjectListGUI.php.

References $info.

Referenced by getListItemHTML().

733  {
734  if(!count($this->item_detail_links))
735  {
736  return true;
737  }
738  if(strlen($this->item_detail_links_intro))
739  {
740  $this->tpl->setCurrentBlock('item_detail_intro');
741  $this->tpl->setVariable('ITEM_DETAIL_INTRO_TXT',$this->item_detail_links_intro);
742  $this->tpl->parseCurrentBlock();
743  }
744 
745  foreach($this->item_detail_links as $info)
746  {
747  $this->tpl->setCurrentBlock('item_detail_link');
748  $this->tpl->setVariable('ITEM_DETAIL_LINK_TARGET',$info['target']);
749  $this->tpl->setVariable('ITEM_DETAIL_LINK_DESC',$info['desc']);
750  $this->tpl->setVariable('ITEM_DETAIL_LINK_HREF',$info['link']);
751  $this->tpl->setVariable('ITEM_DETAIL_LINK_NAME',$info['name']);
752  $this->tpl->parseCurrentBlock();
753  }
754  $this->tpl->setCurrentBlock('item_detail_links');
755  $this->tpl->parseCurrentBlock();
756  }
$info
Definition: example_052.php:80
+ 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 2180 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2181  {
2182  global $objDefinition;
2183 
2184  if ($this->std_cmd_only)
2185  {
2186  return;
2187  }
2188 
2189  // #17307
2190  if(!$this->checkCommandAccess('delete','',$this->ref_id,$this->type) or
2191  !$objDefinition->allowLink($this->type))
2192  {
2193  return false;
2194  }
2195 
2196  // BEGIN PATCH Lucene search
2197 
2198  if(is_object($this->getContainerObject()) and
2200  {
2201  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2202  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "link");
2203  $this->insertCommand($cmd_link, $this->lng->txt("link"));
2204  $this->adm_commands_included = true;
2205  return true;
2206  }
2207  // END PATCH Lucene Search
2208 
2209  // if the permission is changed here, it has
2210  // also to be changed in ilContainerGUI, admin command check
2211  $this->ctrl->setParameter($this->container_obj, "ref_id",
2212  $this->container_obj->object->getRefId());
2213  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2214  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "link");
2215  $this->insertCommand($cmd_link, $this->lng->txt("link"), "",
2216  "");
2217  $this->adm_commands_included = true;
2218  return true;
2219  }
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.
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 2830 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2831  {
2832  global $ilAccess, $objDefinition;
2833 
2834  if ($this->std_cmd_only)
2835  return;
2836 
2837  if(!$objDefinition->isContainer(ilObject::_lookupType($this->obj_id)))
2838  return false;
2839 
2840  if(is_object($this->getContainerObject()) &&
2841  $this->getContainerObject() instanceof ilContainerGUI)
2842  {
2843  $this->ctrl->setParameter($this->getContainerObject(), "type", "");
2844  $this->ctrl->setParameter($this->getContainerObject(), "item_ref_id", "");
2845  $this->ctrl->setParameter($this->getContainerObject(), "active_node", "");
2846  $cmd = $_GET["cmd"] == "enableMultiDownload" ? "render" : "enableMultiDownload";
2847  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), $cmd);
2848  $this->insertCommand($cmd_link, $this->lng->txt("download_multiple_objects"));
2849  return true;
2850  }
2851 
2852  return false;
2853  }
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 1903 of file class.ilObjectListGUI.php.

References getNoticeProperties().

Referenced by getListItemHTML().

1904  {
1905  $this->getNoticeProperties();
1906  foreach($this->notice_prop as $property)
1907  {
1908  $this->tpl->setCurrentBlock('notice_item');
1909  $this->tpl->setVariable('NOTICE_ITEM_VALUE',$property['value']);
1910  $this->tpl->parseCurrentBlock();
1911  }
1912  $this->tpl->setCurrentBlock('notice_property');
1913  $this->tpl->parseCurrentBlock();
1914  }
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 2327 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2328  {
2329  global $ilAccess, $objDefinition;
2330 
2331  if ($this->std_cmd_only)
2332  {
2333  return;
2334  }
2335 
2336  if(!$objDefinition->isContainer(ilObject::_lookupType($this->obj_id)))
2337  {
2338  return false;
2339  }
2340 
2341  if(is_object($this->getContainerObject()) and
2343  isset($_SESSION['clipboard']))
2344  {
2345  $this->ctrl->setParameter($this->getContainerObject(),'item_ref_id',$this->getCommandId());
2346  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), "paste");
2347  $this->insertCommand($cmd_link, $this->lng->txt("paste"));
2348  $this->adm_commands_included = true;
2349  return true;
2350  }
2351  return false;
2352  }
getContainerObject()
get container object
$_SESSION["AccountId"]
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  $start_node = $this->path_start_node
3245  ? $this->path_start_node
3246  : ROOT_FOLDER_ID;
3247 
3248  $this->tpl->setCurrentBlock("path_item");
3249  $this->tpl->setVariable('PATH_ITEM',$path_gui->getPath($start_node,$this->ref_id));
3250  $this->tpl->parseCurrentBlock();
3251 
3252  $this->tpl->setCurrentBlock("path");
3253  $this->tpl->setVariable("TXT_LOCATION", $lng->txt("locator"));
3254  $this->tpl->parseCurrentBlock();
3255  return true;
3256  }
3257  }
Creates a path for a start and endnode.
global $lng
Definition: privfeed.php:17
+ 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 3386 of file class.ilObjectListGUI.php.

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

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

◆ insertPreconditions()

ilObjectListGUI::insertPreconditions ( )

insert all missing preconditions

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

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

Referenced by getListItemHTML().

2031  {
2032  global $ilAccess, $lng, $objDefinition,$tree;
2033 
2034  include_once("./Services/AccessControl/classes/class.ilConditionHandler.php");
2035 
2036  $missing_cond_exist = false;
2037 
2038  // do not show multi level conditions (messes up layout)
2039  if ($this->condition_depth > 0)
2040  {
2041  return;
2042  }
2043 
2044  // Sort by title
2045  /*
2046  foreach(ilConditionHandler::_getConditionsOfTarget($this->ref_id, $this->obj_id) as $condition)
2047  {
2048  $condition['title'] = ilObject::_lookupTitle($condition['trigger_obj_id']);
2049  }
2050  */
2051 
2052  if($this->condition_target)
2053  {
2055  $this->condition_target['ref_id'],
2056  $this->condition_target['obj_id'],
2057  $this->condition_target['target_type']
2058  );
2059  }
2060  else
2061  {
2062  $conditions = ilConditionHandler::_getConditionsOfTarget($this->ref_id, $this->obj_id);
2063  }
2064 
2065  if(sizeof($conditions))
2066  {
2067  for($i = 0; $i < count($conditions); $i++)
2068  {
2069  $conditions[$i]['title'] = ilObject::_lookupTitle($conditions[$i]['trigger_obj_id']);
2070  }
2071  $conditions = ilUtil::sortArray($conditions,'title','DESC');
2072 
2073  ++self::$js_unique_id;
2074 
2075  // Show obligatory and optional preconditions seperated
2076  $all_done_obl = $this->parseConditions(self::$js_unique_id,$conditions,true);
2077  $all_done_opt = $this->parseConditions(self::$js_unique_id,$conditions,false);
2078 
2079  if(!$all_done_obl || !$all_done_opt)
2080  {
2081  $this->tpl->setCurrentBlock("preconditions_toggle");
2082  $this->tpl->setVariable("PRECONDITION_TOGGLE_INTRO", $this->lng->txt("precondition_toggle"));
2083  $this->tpl->setVariable("PRECONDITION_TOGGLE_TRIGGER", $this->lng->txt("show"));
2084  $this->tpl->setVariable("PRECONDITION_TOGGLE_ID", self::$js_unique_id);
2085  $this->tpl->setVariable("TXT_PRECONDITION_SHOW", $this->lng->txt("show"));
2086  $this->tpl->setVariable("TXT_PRECONDITION_HIDE", $this->lng->txt("hide"));
2087  $this->tpl->parseCurrentBlock();
2088  }
2089  }
2090  }
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
global $lng
Definition: privfeed.php:17
+ 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 3265 of file class.ilObjectListGUI.php.

Referenced by getListItemHTML().

3266  {
3267  return true;
3268  }
+ Here is the caller graph for this function:

◆ insertProperties()

ilObjectListGUI::insertProperties ( )

insert properties

private

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

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

Referenced by getListItemHTML().

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

References $lng, enabledRelevance(), ilProgressBar\getInstance(), and getRelevance().

Referenced by getListItemHTML().

1659  {
1660  global $lng;
1661 
1662  if(!$this->enabledRelevance() or !(int) $this->getRelevance())
1663  {
1664  return false;
1665  }
1666 
1667  include_once "Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php";
1668  $pbar = ilProgressBar::getInstance();
1669  $pbar->setCurrent($this->getRelevance());
1670 
1671  $this->tpl->setCurrentBlock('relevance');
1672  $this->tpl->setVariable('REL_PBAR', $pbar->render());
1673  $this->tpl->parseCurrentBlock();
1674  }
static getInstance()
Factory.
enabledRelevance()
enabled relevance
getRelevance()
get relevance
global $lng
Definition: privfeed.php:17
+ 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 1643 of file class.ilObjectListGUI.php.

References getSearchFragment().

Referenced by getListItemHTML().

1644  {
1645  if(strlen($this->getSearchFragment()))
1646  {
1647  $this->tpl->setCurrentBlock('search_fragment');
1648  $this->tpl->setVariable('TXT_SEARCH_FRAGMENT',$this->getSearchFragment().' ...');
1649  $this->tpl->parseCurrentBlock();
1650  }
1651  }
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 3373 of file class.ilObjectListGUI.php.

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

3374  {
3375  foreach ($this->sub_item_html as $sub_html)
3376  {
3377  $this->tpl->setCurrentBlock("subitem");
3378  $this->tpl->setVariable("SUBITEM", $sub_html);
3379  $this->tpl->parseCurrentBlock();
3380  }
3381  }
+ 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 2361 of file class.ilObjectListGUI.php.

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

Referenced by insertCommands().

2362  {
2363  global $ilSetting, $ilUser;
2364 
2365  if ($this->std_cmd_only)
2366  {
2367  return;
2368  }
2369 
2370  if((int)$ilSetting->get('disable_my_offers'))
2371  {
2372  return;
2373  }
2374 
2376 
2377  if ($ilUser->getId() != ANONYMOUS_USER_ID)
2378  {
2379  // #17467 - add ref_id to link (in repository only!)
2380  if(is_object($this->container_obj) &&
2381  !($this->container_obj instanceof ilAdministrationCommandHandling) &&
2382  is_object($this->container_obj->object))
2383  {
2384  $this->ctrl->setParameter($this->container_obj, "ref_id", $this->container_obj->object->getRefId());
2385  }
2386 
2387  if (!$ilUser->isDesktopItem($this->getCommandId(), $type))
2388  {
2389  // Pass type and object ID to ilAccess to improve performance
2390  global $ilAccess;
2391  if ($this->checkCommandAccess("read", "", $this->ref_id, $this->type, $this->obj_id))
2392  {
2393  if($this->getContainerObject() instanceof ilDesktopItemHandling)
2394  {
2395  $this->ctrl->setParameter($this->container_obj, "type", $type);
2396  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2397  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "addToDesk");
2398  $this->insertCommand($cmd_link, $this->lng->txt("to_desktop"), "",
2399  "");
2400  }
2401  }
2402  }
2403  else
2404  {
2405  if ($this->getContainerObject() instanceof ilDesktopItemHandling)
2406  {
2407  $this->ctrl->setParameter($this->container_obj, "type", $type);
2408  $this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->getCommandId());
2409  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "removeFromDesk");
2410  $this->insertCommand($cmd_link, $this->lng->txt("unsubscribe"), "",
2411  "");
2412  }
2413  }
2414  }
2415  }
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 _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
global $ilSetting
Definition: privfeed.php:17
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:

◆ insertSubstitutions()

ilObjectListGUI::insertSubstitutions ( )

Insert substitutions.

public

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

References $data.

Referenced by insertDescription().

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

◆ insertTimingsCommand()

ilObjectListGUI::insertTimingsCommand ( )

insert edit timings command

protected

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

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

Referenced by insertCommands().

2493  {
2494  if ($this->std_cmd_only || !$this->container_obj->object)
2495  {
2496  return;
2497  }
2498 
2499  $parent_ref_id = $this->container_obj->object->getRefId();
2500  $parent_type = $this->container_obj->object->getType();
2501 
2502  // #18737
2503  if($this->reference_ref_id)
2504  {
2505  $this->ctrl->setParameterByClass('ilobjectactivationgui', 'ref_id', $this->reference_ref_id);
2506  }
2507 
2508  if($this->checkCommandAccess('write','',$parent_ref_id,$parent_type) ||
2509  $this->checkCommandAccess('write','',$this->ref_id,$this->type))
2510  {
2511  $this->ctrl->setParameterByClass('ilobjectactivationgui','cadh',
2512  $this->ajax_hash);
2513  $this->ctrl->setParameterByClass('ilobjectactivationgui','parent_id',
2514  $parent_ref_id);
2515  $cmd_lnk = $this->ctrl->getLinkTargetByClass(array($this->gui_class_name, 'ilcommonactiondispatchergui', 'ilobjectactivationgui'),
2516  'edit');
2517 
2518  $this->insertCommand($cmd_lnk, $this->lng->txt('obj_activation_list_gui'));
2519  }
2520 
2521  if($this->reference_ref_id)
2522  {
2523  $this->ctrl->setParameterByClass('ilobjectactivationgui', 'ref_id', $this->ref_id);
2524  }
2525  }
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="")
Create styles array
The data for the language used.
+ 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 1462 of file class.ilObjectListGUI.php.

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

Referenced by getListItemHTML().

1463  {
1464  if($this->restrict_to_goto)
1465  {
1466  $this->default_command = array("frame" => "",
1467  "link" => $this->buildGotoLink());
1468  }
1469  // begin-patch lok
1470  if (
1471  !$this->default_command ||
1472  (!$this->getCommandsStatus() && !$this->restrict_to_goto) ||
1473  $this->title_link_disabled
1474  )
1475  // end-patch lok
1476  {
1477  $this->tpl->setCurrentBlock("item_title");
1478  $this->tpl->setVariable("TXT_TITLE", $this->getTitle());
1479  $this->tpl->parseCurrentBlock();
1480  }
1481  else
1482  {
1483  $this->default_command['link'] = $this->modifyTitleLink($this->default_command['link']);
1484 
1485  $this->default_command["link"] =
1486  $this->modifySAHSlaunch($this->default_command["link"],$this->default_command["frame"]);
1487 
1488  if ($this->default_command["frame"] != "")
1489  {
1490  $this->tpl->setCurrentBlock("title_linked_frame");
1491  $this->tpl->setVariable("TARGET_TITLE_LINKED", $this->default_command["frame"]);
1492  $this->tpl->parseCurrentBlock();
1493  }
1494 
1495  // workaround for repository frameset
1496  #var_dump("<pre>",$this->default_command['link'],"</pre>");
1497  $this->default_command["link"] =
1498  $this->appendRepositoryFrameParameter($this->default_command["link"]);
1499 
1500  #var_dump("<pre>",$this->default_command['link'],"</pre>");
1501 
1502 
1503  // the default command is linked with the title
1504  $this->tpl->setCurrentBlock("item_title_linked");
1505  $this->tpl->setVariable("TXT_TITLE_LINKED", $this->getTitle());
1506  $this->tpl->setVariable("HREF_TITLE_LINKED", $this->default_command["link"]);
1507 
1508  // has preview?
1509  include_once("./Services/Preview/classes/class.ilPreview.php");
1510  if (ilPreview::hasPreview($this->obj_id, $this->type))
1511  {
1512  include_once("./Services/Preview/classes/class.ilPreviewGUI.php");
1513 
1514  // get context for access checks later on
1515  $access_handler = null;
1516  $context;
1517  switch ($this->context)
1518  {
1519  case self::CONTEXT_WORKSPACE:
1520  case self::CONTEXT_WORKSPACE_SHARING:
1522  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
1523  $access_handler = new ilWorkspaceAccessHandler();
1524  break;
1525 
1526  default:
1527  global $ilAccess;
1529  $access_handler = $ilAccess;
1530  break;
1531  }
1532 
1533  $preview = new ilPreviewGUI($this->ref_id, $context, $this->obj_id, $access_handler);
1534  $preview_status = ilPreview::lookupRenderStatus($this->obj_id);
1535  $preview_status_class = "";
1536  $preview_text_topic = "preview_show";
1537  if ($preview_status == ilPreview::RENDER_STATUS_NONE)
1538  {
1539  $preview_status_class = "ilPreviewStatusNone";
1540  $preview_text_topic = "preview_none";
1541  }
1542  $this->tpl->setCurrentBlock("item_title_linked");
1543  $this->tpl->setVariable("PREVIEW_STATUS_CLASS", $preview_status_class);
1544  $this->tpl->setVariable("SRC_PREVIEW_ICON", ilUtil::getImagePath("preview.png", "Services/Preview"));
1545  $this->tpl->setVariable("TXT_PREVIEW", $this->lng->txt($preview_text_topic));
1546  $this->tpl->setVariable("SCRIPT_PREVIEW_CLICK", $preview->getJSCall($this->getUniqueItemId(true)));
1547  $this->tpl->parseCurrentBlock();
1548  }
1549 
1550  $this->tpl->parseCurrentBlock();
1551  }
1552 
1553  if ($this->bold_title == true)
1554  {
1555  $this->tpl->touchBlock('bold_title_start');
1556  $this->tpl->touchBlock('bold_title_end');
1557  }
1558  }
$preview
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)
Create styles array
The data for the language used.
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
modifyTitleLink($a_default_link)
+ 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 3789 of file class.ilObjectListGUI.php.

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

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

3790  {
3791  if($this->comments_enabled)
3792  {
3793  if(!$this->comments_settings_enabled)
3794  {
3795  return true;
3796  }
3797  if($a_check_write_access && $this->checkCommandAccess('write','', $a_ref_id, $a_type))
3798  {
3799  return true;
3800  }
3801  // fallback to single object check if no preloaded data
3802  // only the repository does preloadCommonProperties() yet
3803  if(!$a_header_actions && self::$preload_done)
3804  {
3805  if(self::$comments_activation[$a_obj_id][$a_type])
3806  {
3807  return true;
3808  }
3809  }
3810  else
3811  {
3812  include_once("./Services/Notes/classes/class.ilNote.php");
3813  if(ilNote::commentsActivated($a_obj_id, 0, $a_type))
3814  {
3815  return true;
3816  }
3817  }
3818  }
3819  return false;
3820  }
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
$a_type
Definition: workflow.php:93
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 438 of file class.ilObjectListGUI.php.

References $is_expanded.

Referenced by insertIconsAndCheckboxes().

439  {
440  return $this->is_expanded;
441  }
+ 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 3839 of file class.ilObjectListGUI.php.

References ilFileUploadUtil\isUploadAllowed().

Referenced by getListItemHTML().

3840  {
3841  // check if file upload allowed
3842  include_once("./Services/FileUpload/classes/class.ilFileUploadUtil.php");
3843  return ilFileUploadUtil::isUploadAllowed($this->ref_id, $this->type);
3844  }
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 1711 of file class.ilObjectListGUI.php.

Referenced by getListItemHTML(), and insertCommands().

1712  {
1713  if ($a_mode == $this->mode)
1714  {
1715  return true;
1716  }
1717  else
1718  {
1719  return false;
1720  }
1721  }
+ 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 3687 of file class.ilObjectListGUI.php.

3688  {
3689  return false;
3690  }

◆ isTitleBold()

ilObjectListGUI::isTitleBold ( )

public

Returns
boolean returns if the item title is bold or not

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

References $bold_title.

3709  {
3710  return $this->bold_title;
3711  }

◆ isVisibleOnlyForced()

ilObjectListGUI::isVisibleOnlyForced ( )

Force unreadable.

Returns
type

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

References $force_visible_only.

Referenced by checkCommandAccess().

1342  {
1344  }
+ 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 3209 of file class.ilObjectListGUI.php.

References $DIC.

Referenced by insertTitle().

3210  {
3211  global $DIC;
3212 
3213  if (strstr($a_link, 'ilSAHSPresentationGUI') && !$this->offline_mode)
3214  {
3215  include_once 'Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
3216  $sahs_obj = new ilObjSAHSLearningModule($this->ref_id);
3217  $om = $sahs_obj->getOpenMode();
3218  $width = $sahs_obj->getWidth();
3219  $height = $sahs_obj->getHeight();
3220  if ( ($om == 5 || $om == 1) && $width > 0 && $height > 0) $om++;
3221  if ($om != 0 && !$DIC['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  }
global $DIC
Class ilObjSCORMLearningModule.
+ Here is the caller graph for this function:

◆ modifyTitleLink()

ilObjectListGUI::modifyTitleLink (   $a_default_link)
protected

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

References $params, and array.

Referenced by insertTitle().

3182  {
3183  if($this->default_command_params)
3184  {
3185  $params = array();
3186  foreach($this->default_command_params as $name => $value)
3187  {
3188  $params[] = $name.'='.$value;
3189  }
3190  $params = implode('&', $params);
3191 
3192 
3193  // #12370
3194  if(!stristr($a_default_link, '?'))
3195  {
3196  $a_default_link = ($a_default_link.'?'.$params);
3197  }
3198  else
3199  {
3200  $a_default_link = ($a_default_link.'&'.$params);
3201  }
3202  }
3203  return $a_default_link;
3204  }
Create styles array
The data for the language used.
$params
Definition: example_049.php:96
+ Here is the caller graph for this function:

◆ parseConditions()

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

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

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

Referenced by insertPreconditions().

1917  {
1918  global $ilAccess, $lng, $objDefinition,$tree;
1919 
1920  $num_required = ilConditionHandler::calculateRequiredTriggers($this->ref_id, $this->obj_id);
1921  $num_optional_required =
1922  $num_required - count($conditions) + count(ilConditionHandler::getOptionalConditionsOfTarget($this->ref_id, $this->obj_id));
1923 
1924  // Check if all conditions are fullfilled
1925  $visible_conditions = array();
1926  $passed_optional = 0;
1927  foreach($conditions as $condition)
1928  {
1929  if($obligatory and !$condition['obligatory'])
1930  {
1931  continue;
1932  }
1933  if(!$obligatory and $condition['obligatory'])
1934  {
1935  continue;
1936  }
1937 
1938  if($tree->isDeleted($condition['trigger_ref_id']))
1939  {
1940  continue;
1941  }
1942 
1943  include_once 'Services/Container/classes/class.ilMemberViewSettings.php';
1944  $ok = ilConditionHandler::_checkCondition($condition['id']) and
1945  !ilMemberViewSettings::getInstance()->isActive();
1946 
1947  if(!$ok)
1948  {
1949  $visible_conditions[] = $condition['id'];
1950  }
1951 
1952  if(!$obligatory and $ok)
1953  {
1954  ++$passed_optional;
1955  // optional passed
1956  if($passed_optional >= $num_optional_required)
1957  {
1958  return true;
1959  }
1960  }
1961  }
1962 
1963  foreach($conditions as $condition)
1964  {
1965  if(!in_array($condition['id'], $visible_conditions))
1966  {
1967  continue;
1968  }
1969 
1970  include_once './Services/AccessControl/classes/class.ilConditionHandlerGUI.php';
1971  $cond_txt = ilConditionHandlerGUI::translateOperator($condition['trigger_obj_id'],$condition['operator']).' '.$condition['value'];
1972 
1973  // display trigger item
1974  $class = $objDefinition->getClassName($condition["trigger_type"]);
1975  $location = $objDefinition->getLocation($condition["trigger_type"]);
1976  if ($class == "" && $location == "")
1977  {
1978  continue;
1979  }
1980  $missing_cond_exist = true;
1981 
1982  $full_class = "ilObj".$class."ListGUI";
1983  include_once($location."/class.".$full_class.".php");
1984  $item_list_gui = new $full_class($this);
1985  $item_list_gui->setMode(IL_LIST_AS_TRIGGER);
1986  $item_list_gui->enablePath(false);
1987  $item_list_gui->enableIcon(true);
1988  $item_list_gui->setConditionDepth($this->condition_depth + 1);
1989  $item_list_gui->setParentRefId($this->getUniqueItemId()); // yes we can
1990  $item_list_gui->addCustomProperty($this->lng->txt("precondition_required_itemlist"), $cond_txt, false, true);
1991 
1992  $item_list_gui->enableCommands($this->commands_enabled, $this->std_cmd_only);
1993  $item_list_gui->enableProperties($this->properties_enabled);
1994 
1995  $trigger_html = $item_list_gui->getListItemHTML($condition['trigger_ref_id'],
1996  $condition['trigger_obj_id'], ilObject::_lookupTitle($condition["trigger_obj_id"]),
1997  "");
1998  $this->tpl->setCurrentBlock("precondition");
1999  if ($trigger_html == "")
2000  {
2001  $trigger_html = $this->lng->txt("precondition_not_accessible");
2002  }
2003  $this->tpl->setVariable("TXT_CONDITION", trim($cond_txt));
2004  $this->tpl->setVariable("TRIGGER_ITEM", $trigger_html);
2005  $this->tpl->parseCurrentBlock();
2006  }
2007 
2008  if ($missing_cond_exist and $obligatory)
2009  {
2010  $this->tpl->setCurrentBlock("preconditions");
2011  $this->tpl->setVariable("CONDITION_TOGGLE_ID", "_obl_".$toggle_id);
2012  $this->tpl->setVariable("TXT_PRECONDITIONS", $lng->txt("preconditions_obligatory_hint"));
2013  $this->tpl->parseCurrentBlock();
2014 
2015  }
2016  elseif($missing_cond_exist and !$obligatory)
2017  {
2018  $this->tpl->setCurrentBlock("preconditions");
2019  $this->tpl->setVariable("CONDITION_TOGGLE_ID", "_opt_".$toggle_id);
2020  $this->tpl->setVariable("TXT_PRECONDITIONS", sprintf($lng->txt("preconditions_optional_hint"),$num_optional_required));
2021  $this->tpl->parseCurrentBlock();
2022  }
2023 
2024  return !$missing_cond_exist;
2025  }
static _checkCondition($a_id, $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...
const IL_LIST_AS_TRIGGER
$location
Definition: buildRTE.php:44
static translateOperator($a_obj_id, $a_operator)
Translate operator.
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.
Create styles array
The data for the language used.
static getInstance()
Get instance.
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
global $lng
Definition: privfeed.php:17
+ 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 3719 of file class.ilObjectListGUI.php.

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

Referenced by ilObjectListGUIPreloader\preload().

3720  {
3721  global $lng, $ilSetting, $ilUser;
3722 
3723  if($a_context == self::CONTEXT_REPOSITORY)
3724  {
3725  $active_notes = !$ilSetting->get("disable_notes");
3726  $active_comments = !$ilSetting->get("disable_comments");
3727 
3728  if($active_notes || $active_comments)
3729  {
3730  include_once("./Services/Notes/classes/class.ilNote.php");
3731  }
3732 
3733  if($active_comments)
3734  {
3735  // needed for action
3736  self::$comments_activation = ilNote::getRepObjActivation($a_obj_ids);
3737  }
3738 
3739  // properties are optional
3740  if($ilSetting->get('comments_tagging_in_lists'))
3741  {
3742  if($active_notes || $active_comments)
3743  {
3744  self::$cnt_notes = ilNote::_countNotesAndCommentsMultiple($a_obj_ids, true);
3745 
3746  $lng->loadLanguageModule("notes");
3747  }
3748 
3749  $tags_set = new ilSetting("tags");
3750  if($tags_set->get("enable"))
3751  {
3752  $all_users = $tags_set->get("enable_all_users");
3753 
3754  include_once("./Services/Tagging/classes/class.ilTagging.php");
3755  if(!$ilSetting->get('comments_tagging_in_lists_tags'))
3756  {
3757  self::$cnt_tags = ilTagging::_countTags($a_obj_ids, $all_users);
3758  }
3759  else
3760  {
3761  $tag_user_id = null;
3762  if(!$all_users)
3763  {
3764  $tag_user_id = $ilUser->getId();
3765  }
3766  self::$tags = ilTagging::_getListTagsForObjects($a_obj_ids, $tag_user_id);
3767  }
3768 
3769  $lng->loadLanguageModule("tagging");
3770  }
3771  }
3772 
3773  $lng->loadLanguageModule("rating");
3774  }
3775 
3776  self::$preload_done = true;
3777  }
ILIAS Setting Class.
static getRepObjActivation($a_rep_obj_ids)
Get activation for repository objects.
$ilUser
Definition: imgupload.php:18
static _countTags($a_obj_ids, $a_all_users=false)
Count all tags for repository objects.
global $ilSetting
Definition: privfeed.php:17
global $lng
Definition: privfeed.php:17
static _getListTagsForObjects(array $a_obj_ids, $a_user_id=null)
Get tags for given object ids.
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 2886 of file class.ilObjectListGUI.php.

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

Referenced by ilObjWorkspaceFolderGUI\render().

2887  {
2888  global $tpl;
2889 
2890  if (is_null($a_tpl))
2891  {
2892  $a_tpl = $tpl;
2893  }
2894 
2895  if($a_notes_url)
2896  {
2897  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
2898  ilNoteGUI::initJavascript($a_notes_url);
2899  }
2900 
2901  if($a_tags_url)
2902  {
2903  include_once("./Services/Tagging/classes/class.ilTaggingGUI.php");
2904  ilTaggingGUI::initJavascript($a_tags_url);
2905  }
2906 
2907  if($a_redraw_url)
2908  {
2909  $a_tpl->addOnLoadCode("il.Object.setRedrawAHUrl('".
2910  $a_redraw_url."');");
2911  }
2912  }
static initJavascript($a_ajax_url)
Init javascript.
global $tpl
Definition: ilias.php:8
static initJavascript($a_ajax_url, $a_type=IL_NOTE_PRIVATE)
Init javascript.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetConditionTarget()

ilObjectListGUI::resetConditionTarget ( )

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

References array.

998  {
999  $this->condition_target = array();
1000  }
Create styles array
The data for the language used.

◆ resetCustomData()

ilObjectListGUI::resetCustomData ( )
protected

reset properties and commands

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

References array.

Referenced by getListItemHTML().

3625  {
3626  // #15747
3627  $this->cust_prop = array();
3628  $this->cust_commands = array();
3629  $this->sub_item_html = array();
3630  $this->position_enabled = false;
3631  }
Create styles array
The data for the language used.
+ 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 906 of file class.ilObjectListGUI.php.

907  {
908  $this->restrict_to_goto = (bool)$a_value;
909  }

◆ setAdditionalInformation()

ilObjectListGUI::setAdditionalInformation (   $a_val)

Set additional information.

Parameters
stringadditional information

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

Referenced by ilObjStudyProgrammeListGUI\getListItemHTML().

856  {
857  $this->additional_information = $a_val;
858  }
+ Here is the caller graph for this function:

◆ setAjaxHash()

ilObjectListGUI::setAjaxHash (   $a_hash)

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

Referenced by getListItemHTML().

2965  {
2966  $this->ajax_hash = $a_hash;
2967  }
+ 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 3697 of file class.ilObjectListGUI.php.

3698  {
3699  $this->bold_title = $a_bold_title;
3700 
3701  }

◆ setConditionDepth()

ilObjectListGUI::setConditionDepth (   $a_depth)

set depth for precondition output (stops at level 5)

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

1700  {
1701  $this->condition_depth = $a_depth;
1702  }

◆ setConditionTarget()

ilObjectListGUI::setConditionTarget (   $a_ref_id,
  $a_obj_id,
  $a_target_type 
)

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

References array.

Referenced by ilContainerObjectiveGUI\addItemDetails().

989  {
990  $this->condition_target = array(
991  'ref_id' => $a_ref_id,
992  'obj_id' => $a_obj_id,
993  'target_type' => $a_target_type
994  );
995  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ 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 172 of file class.ilObjectListGUI.php.

173  {
174  $this->container_obj = $container_obj;
175  }

◆ setDefaultCommandParameters()

ilObjectListGUI::setDefaultCommandParameters ( array  $a_params)

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

Referenced by ilContainerObjectiveGUI\addItemDetails().

1009  {
1010  $this->default_command_params = $a_params;
1011  }
+ Here is the caller graph for this function:

◆ setDescription()

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

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

Referenced by initItem().

784  {
785  $this->description = $a_description;
786  }
+ 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 877 of file class.ilObjectListGUI.php.

878  {
879  $this->details_level = $a_level;
880  }

◆ setExpanded()

ilObjectListGUI::setExpanded (   $a_status)

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

434  {
435  $this->is_expanded = $a_status;
436  }

◆ setHeaderSubObject()

ilObjectListGUI::setHeaderSubObject (   $a_type,
  $a_id 
)

Set sub object identifier.

Parameters
string$a_type
int$a_id

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

References $a_type.

2921  {
2922  $this->sub_obj_type = $a_type;
2923  $this->sub_obj_id = (int)$a_id;
2924  }
$a_type
Definition: workflow.php:93

◆ 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 719 of file class.ilObjectListGUI.php.

Referenced by ilContainerObjectiveGUI\addItemDetails().

720  {
721  $this->item_detail_links = $a_detail_links;
722  $this->item_detail_links_intro = $a_intro_txt;
723  }
+ Here is the caller graph for this function:

◆ setMode()

ilObjectListGUI::setMode (   $a_mode)

set output mode

Parameters
string$a_modeoutput mode (IL_LIST_FULL | IL_LIST_AS_TRIGGER)

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

1682  {
1683  $this->mode = $a_mode;
1684  }

◆ setParentRefId()

ilObjectListGUI::setParentRefId (   $a_ref_id)

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

Parameters
string$a_ref_id

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

Referenced by __construct().

3639  {
3640  $this->parent_ref_id = $a_ref_id;
3641  }
+ 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 448 of file class.ilObjectListGUI.php.

449  {
450  $this->position_enabled = true;
451  $this->position_field_index = $a_field_index;
452  $this->position_value = $a_position_value;
453  }

◆ setRelevance()

ilObjectListGUI::setRelevance (   $a_rel)

set relevance

Parameters
int
Returns

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

359  {
360  $this->relevance = $a_rel;
361  }

◆ setSearchFragment()

ilObjectListGUI::setSearchFragment (   $a_text)

set search fragment

Parameters
string$a_texthighlighted search fragment
Returns

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

804  {
805  $this->search_fragment = $a_text;
806  }

◆ setSeparateCommands()

ilObjectListGUI::setSeparateCommands (   $a_val)

Set separate commands.

Parameters
booleanseparate commands

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

823  {
824  $this->separate_commands = $a_val;
825  }

◆ setTitle()

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

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

Referenced by initItem().

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

◆ storeAccessCache()

ilObjectListGUI::storeAccessCache ( )

Store access cache.

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

References $ilUser, and $ref_id.

Referenced by getListItemHTML().

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

Field Documentation

◆ $additional_information

ilObjectListGUI::$additional_information = false
protected

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

Referenced by getAdditionalInformation().

◆ $bold_title

ilObjectListGUI::$bold_title = false
protected

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

Referenced by isTitleBold().

◆ $checkboxes_enabled

ilObjectListGUI::$checkboxes_enabled = false
protected

Definition at line 64 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 44 of file class.ilObjectListGUI.php.

Referenced by getCommandsStatus().

◆ $comments_activation

ilObjectListGUI::$comments_activation = array()
staticprotected

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

◆ $comments_enabled

ilObjectListGUI::$comments_enabled = false
protected

◆ $comments_settings_enabled

ilObjectListGUI::$comments_settings_enabled = false
protected

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

◆ $condition_depth

ilObjectListGUI::$condition_depth = 0

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

◆ $context

ilObjectListGUI::$context
protected

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

Referenced by insertTitle().

◆ $copy_enabled

ilObjectListGUI::$copy_enabled = true
protected

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

Referenced by getCopyStatus().

◆ $ctrl

ilObjectListGUI::$ctrl

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

◆ $cust_commands

ilObjectListGUI::$cust_commands = array()

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

◆ $cust_prop

ilObjectListGUI::$cust_prop = array()

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

◆ $description_enabled

ilObjectListGUI::$description_enabled = true

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

Referenced by getDescriptionStatus().

◆ $details_level

ilObjectListGUI::$details_level = self::DETAILS_ALL
protected

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

Referenced by getDetailsLevel().

◆ $download_checkbox_state

ilObjectListGUI::$download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE

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

Referenced by getDownloadCheckboxState().

◆ $enabled_relevance

ilObjectListGUI::$enabled_relevance = false
protected

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

Referenced by enabledRelevance().

◆ $expand_enabled

ilObjectListGUI::$expand_enabled = false
protected

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

Referenced by getExpandStatus().

◆ $force_visible_only

ilObjectListGUI::$force_visible_only = false
protected

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

Referenced by isVisibleOnlyForced().

◆ $icons_enabled

ilObjectListGUI::$icons_enabled = false
protected

Definition at line 63 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 79 of file class.ilObjectListGUI.php.

Referenced by isExpanded().

◆ $item_detail_links

ilObjectListGUI::$item_detail_links = array()
protected

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

◆ $item_detail_links_enabled

ilObjectListGUI::$item_detail_links_enabled = false
protected

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

Referenced by getItemDetailLinkStatus().

◆ $item_detail_links_intro

ilObjectListGUI::$item_detail_links_intro = ''
protected

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

◆ $js_unique_id

ilObjectListGUI::$js_unique_id = 0
staticprotected

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

◆ $multi_download_enabled

ilObjectListGUI::$multi_download_enabled = false

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

◆ $notes_enabled

ilObjectListGUI::$notes_enabled = false
protected

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

◆ $notice_properties_enabled

ilObjectListGUI::$notice_properties_enabled = true

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

Referenced by getNoticePropertiesStatus().

◆ $obj_id

◆ $parent_ref_id

ilObjectListGUI::$parent_ref_id
protected

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

Referenced by insertTimingsCommand().

◆ $path_linked

ilObjectListGUI::$path_linked = false
protected

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

◆ $position_enabled

ilObjectListGUI::$position_enabled = false
protected

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

◆ $preconditions_enabled

ilObjectListGUI::$preconditions_enabled = true

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

Referenced by getPreconditionsStatus().

◆ $preload_done

ilObjectListGUI::$preload_done = false
staticprotected

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

◆ $prevent_duplicate_commands

ilObjectListGUI::$prevent_duplicate_commands = array()
protected

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

◆ $progress_enabled

ilObjectListGUI::$progress_enabled = false
protected

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

Referenced by getProgressInfoStatus().

◆ $properties_enabled

ilObjectListGUI::$properties_enabled = true

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

Referenced by getPropertiesStatus().

◆ $rating_categories_enabled

ilObjectListGUI::$rating_categories_enabled = false
protected

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

◆ $rating_ctrl_path

ilObjectListGUI::$rating_ctrl_path = false
protected

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

◆ $rating_enabled

ilObjectListGUI::$rating_enabled = false
protected

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

◆ $rating_text

ilObjectListGUI::$rating_text = false
protected

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

◆ $ref_id

ilObjectListGUI::$ref_id
protected

◆ $reference_ref_id

ilObjectListGUI::$reference_ref_id = false
protected

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

Referenced by insertCommonSocialCommands(), and insertProperties().

◆ $relevance

ilObjectListGUI::$relevance = 0
protected

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

Referenced by getRelevance().

◆ $repository_transfer_enabled

ilObjectListGUI::$repository_transfer_enabled = false
protected

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

◆ $restrict_to_goto

ilObjectListGUI::$restrict_to_goto = false
protected

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

◆ $search_fragment

ilObjectListGUI::$search_fragment = ''
protected

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

Referenced by getSearchFragment().

◆ $search_fragment_enabled

ilObjectListGUI::$search_fragment_enabled = false
protected

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

Referenced by getSearchFragmentStatus().

◆ $search_fragments_enabled

ilObjectListGUI::$search_fragments_enabled = false
protected

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

◆ $separate_commands

ilObjectListGUI::$separate_commands = false
protected

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

Referenced by getSeparateCommands().

◆ $shared

ilObjectListGUI::$shared = false
protected

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

◆ $static_link_enabled

ilObjectListGUI::$static_link_enabled = false
protected

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

◆ $std_cmd_only

ilObjectListGUI::$std_cmd_only = false

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

◆ $sub_item_html

ilObjectListGUI::$sub_item_html = array()

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

◆ $sub_obj_id

ilObjectListGUI::$sub_obj_id
protected

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

◆ $sub_obj_type

ilObjectListGUI::$sub_obj_type
protected

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

◆ $substitutions

ilObjectListGUI::$substitutions = null
protected

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

◆ $substitutions_enabled

ilObjectListGUI::$substitutions_enabled = false
protected

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

Referenced by getSubstitutionStatus().

◆ $tags

ilObjectListGUI::$tags = array()
staticprotected

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

Referenced by getHeaderAction().

◆ $tags_enabled

ilObjectListGUI::$tags_enabled = false
protected

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

◆ $timings_enabled

ilObjectListGUI::$timings_enabled = true
protected

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

◆ $title_link

ilObjectListGUI::$title_link = ''
protected

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

◆ $title_link_disabled

ilObjectListGUI::$title_link_disabled = false
protected

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

◆ $tpl_component

ilObjectListGUI::$tpl_component = "Services/Container"
staticprotected

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

◆ $tpl_file_name

ilObjectListGUI::$tpl_file_name = "tpl.container_list_item.html"
staticprotected

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

◆ $type

◆ $ui

ilObjectListGUI::$ui
protected

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

◆ CONTEXT_PERSONAL_DESKTOP

◆ CONTEXT_REPOSITORY

◆ CONTEXT_SEARCH

const ilObjectListGUI::CONTEXT_SEARCH = 6

◆ CONTEXT_WORKSPACE

const ilObjectListGUI::CONTEXT_WORKSPACE = 2

◆ CONTEXT_WORKSPACE_SHARING

const ilObjectListGUI::CONTEXT_WORKSPACE_SHARING = 4

Definition at line 31 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 37 of file class.ilObjectListGUI.php.

◆ DOWNLOAD_CHECKBOX_ENABLED

const ilObjectListGUI::DOWNLOAD_CHECKBOX_ENABLED = 1

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

◆ DOWNLOAD_CHECKBOX_NONE

const ilObjectListGUI::DOWNLOAD_CHECKBOX_NONE = 0

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


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