ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjectListGUI Class Reference

Important note: More...

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

Public Member Functions

 setContainerObject (object $container_obj)
 
 getContainerObject ()
 
 init ()
 initialisation More...
 
 enableProperties (bool $status)
 
 getPropertiesStatus ()
 
 enablePreconditions (bool $status)
 
 getPreconditionsStatus ()
 
 enableNoticeProperties (bool $status)
 
 getNoticePropertiesStatus ()
 
 enableDescription (bool $status)
 
 getDescriptionStatus ()
 
 enableSearchFragments (bool $status)
 
 getSearchFragmentStatus ()
 
 enableLinkedPath (bool $status)
 
 setRelevance (int $rel)
 
 getRelevance ()
 
 enableIcon (bool $status)
 
 getIconStatus ()
 
 enableCheckbox (bool $status)
 
 getCheckboxStatus ()
 
 enableExpand (bool $status)
 
 getExpandStatus ()
 
 setExpanded (bool $status)
 
 isExpanded ()
 
 setPositionInputField (string $field_index, string $position_value)
 
 enableDelete (bool $status)
 
 getDeleteStatus ()
 
 enableCut (bool $status)
 
 getCutStatus ()
 
 enableCopy (bool $status)
 
 getCopyStatus ()
 
 enableSubscribe (bool $status)
 
 getSubscribeStatus ()
 
 enableLink (bool $status)
 
 getLinkStatus ()
 
 enablePath (bool $path, int $start_node=0, ?\ilPathGUI $path_gui=null)
 
 getPathStatus ()
 
 enableCommands (bool $status, bool $std_only=false)
 
 getCommandsStatus ()
 
 enableInfoScreen (bool $info_screen)
 
 getInfoScreenStatus ()
 
 addSubItemHTML (string $html)
 Add HTML for sub item (used for sessions) More...
 
 enableProgressInfo (bool $status)
 
 getProgressInfoStatus ()
 
 enableSubstitutions (bool $status)
 
 getSubstitutionStatus ()
 
 enableItemDetailLinks (bool $status)
 enable item detail links E.g Direct links to chapters or pages More...
 
 getItemDetailLinkStatus ()
 get item detail link status More...
 
 setItemDetailLinks (array $detail_links, string $intro_txt='')
 set items detail links More...
 
 insertItemDetailLinks ()
 
 setTitle (string $title)
 
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php More...
 
 setDescription (string $description)
 
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php More...
 
 setSearchFragment (string $text)
 
 getSearchFragment ()
 
 setSeparateCommands (bool $val)
 
 getSeparateCommands ()
 
 getCommandId ()
 get command id Normally the ref id. More...
 
 setAdditionalInformation (?string $val)
 
 getAdditionalInformation ()
 
 setDetailsLevel (int $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 ()
 
 enableRepositoryTransfer (bool $value)
 Enable copy/move to repository (from personal workspace) More...
 
 restrictToGoto (bool $value)
 Restrict all actions/links to goto. More...
 
 getDefaultCommand ()
 
 checkCommandAccess (string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
 
 initItem (int $ref_id, int $obj_id, string $type, string $title='', string $description='')
 initialize new item (is called by getItemHTML()) More...
 
 setConditionTarget (int $ref_id, int $obj_id, string $target_type)
 
 resetConditionTarget ()
 
 disableTitleLink (bool $status)
 
 setDefaultCommandParameters (array $params)
 
 createDefaultCommand (array $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 (string $cmd)
 Get command link url. More...
 
 getCommandFrame (string $cmd)
 Get command target frame. More...
 
 getCommandImage (string $cmd)
 Get command icon image. More...
 
 getProperties ()
 Get item properties. More...
 
 addCustomProperty (string $property='', string $value='', bool $alert=false, bool $newline=false)
 
 getCustomProperties (array $prop)
 
 getAlertProperties ()
 
 getNoticeProperties ()
 
 addCustomCommand (string $link, string $lang_var, string $frame='', string $onclick='')
 
 addCustomCommandButton (Button $button, ?Modal $triggeredModal=null)
 
 forceVisibleOnly (bool $stat)
 
 isVisibleOnlyForced ()
 
 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 ()
 
 insertSubstitutions ()
 
 insertDescription ()
 
 insertSearchFragment ()
 Insert highlighted search fragment. More...
 
 setMode (string $mode)
 set output mode More...
 
 getMode ()
 get output mode More...
 
 setConditionDepth (int $depth)
 set depth for precondition output (stops at level 5) More...
 
 isMode (string $mode)
 check current output mode More...
 
 determineProperties ()
 
 insertProperties ()
 
 insertNoticeProperties ()
 
 insertPreconditions ()
 insert all missing preconditions More...
 
 insertCommand (string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
 insert command button More...
 
 insertDeleteCommand ()
 
 insertLinkCommand ()
 
 insertCutCommand (bool $to_repository=false)
 
 insertCopyCommand (bool $to_repository=false)
 
 insertPasteCommand ()
 
 insertSubscribeCommand ()
 
 insertInfoScreenCommand ()
 
 insertCommonSocialCommands (bool $header_actions=false)
 Insert common social commands (comments, notes, tagging) More...
 
 insertTimingsCommand ()
 ks, 23 OCT 2023: This function is badly named and it already was before the changes made today. More...
 
 enableComments (bool $value, bool $enable_comments_settings=true)
 
 enableNotes (bool $value)
 
 enableTags (bool $value)
 
 enableRating (bool $value, ?string $text=null, bool $categories=false, ?array $ctrl_path=null, bool $force_rate_parent=false)
 
 enableMultiDownload (bool $value)
 Toggles whether multiple objects can be downloaded at once or not. More...
 
 insertMultiDownloadCommand ()
 
 enableDownloadCheckbox (int $ref_id)
 
 getDownloadCheckboxState ()
 
 setHeaderSubObject (?string $type, ?int $id)
 
 addHeaderIcon (string $id, string $img, ?string $tooltip=null, ?string $onclick=null, ?string $status_text=null, ?string $href=null)
 
 addHeaderIconHTML (string $id, string $html)
 
 addHeaderGlyph (string $id, ILIAS\UI\Component\Symbol\Glyph\Glyph $glyph, $onclick=null)
 
 setAjaxHash (string $hash)
 
 getHeaderAction (?ilGlobalTemplateInterface $main_tpl=null)
 
 appendRepositoryFrameParameter (string $link)
 workaround: all links into the repository (from outside) must tell repository to set up the frameset More...
 
 modifySAHSlaunch (string $link, string $target)
 workaround: SAHS in new javavasript-created window or iframe More...
 
 insertPath ()
 
 insertProgressInfo ()
 
 insertIconsAndCheckboxes ()
 
 getTypeIcon ()
 Get object type specific type icon. More...
 
 insertSubItems ()
 
 insertPositionField ()
 
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output More...
 
 storeAccessCache ()
 
 getListItemHTML (int $ref_id, int $obj_id, string $title, string $description)
 Get all item information (title, commands, description) in HTML. More...
 
 setParentRefId (int $ref_id)
 Set current parent ref id to enable unique js-ids (sessions, etc.) More...
 
 getUniqueItemId (bool $as_div=false)
 Get unique item identifier (for js-actions) More...
 
 getCommandsHTML (string $title='')
 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 (bool $bold_title)
 
 isTitleBold ()
 
 enableTimings (bool $status)
 enable timings link More...
 
 getAsListItem (int $ref_id, int $obj_id, string $type, string $title, string $description)
 Get list item ui object. More...
 
 getAsCard (int $ref_id, int $obj_id, string $type, string $title, string $description)
 Get card object. More...
 
 checkInfoPageOnAsynchronousRendering ()
 
 insertLPCommand ()
 insert learning progress command More...
 

Static Public Member Functions

static prepareJsLinks (string $redraw_url, string $notes_url, string $tags_url, ?ilGlobalTemplateInterface $tpl=null)
 Insert js/ajax links into template. More...
 
static preloadCommonProperties (array $obj_ids, int $context)
 

Data Fields

const IL_LIST_AS_TRIGGER = 'trigger'
 
const IL_LIST_FULL = 'full'
 
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
 

Protected Member Functions

 enableLearningProgress (bool $enabled)
 
 enableLPSettingsCommand (bool $enabled)
 
 buildGotoLink ()
 
 parseConditions (int $toggle_id, array $conditions, bool $obligatory=true)
 
 modifyTitleLink (string $default_link)
 
 resetCustomData ()
 reset properties and commands More...
 
 isCommentsActivated (string $type, int $ref_id, int $obj_id, bool $header_actions, bool $check_write_access=true)
 Check comments status against comments settings and context. More...
 

Protected Attributes

bool $force_rate_parent = false
 
array $access_cache
 
ilAccessHandler $access
 
ilObjUser $user
 
ilObjectDIC $object_dic
 
ilObjectProperties $object_properties
 
ilObjectDefinition $obj_definition
 
ilTree $tree
 
ilSetting $settings
 
HTTPServices $http
 
UIServices $ui
 
ilGlobalTemplateInterface $main_tpl
 
ilRbacSystem $rbacsystem
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
string $mode
 
bool $path_enabled
 
int $context
 
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
 
ILIAS Refinery Factory $refinery
 
bool $static_link_enabled = false
 
bool $delete_enabled = false
 
bool $cut_enabled = false
 
bool $subscribe_enabled = false
 
bool $link_enabled = false
 
bool $copy_enabled = true
 
bool $progress_enabled = false
 
bool $notice_properties_enabled = true
 
bool $info_screen_enabled = false
 
string $type
 
string $gui_class_name = ''
 
array $commands = []
 
ilLDAPRoleGroupMapping $ldap_mapping
 
ilFavouritesManager $fav_manager
 
int $requested_ref_id
 
string $requested_cmd
 
string $requested_base_class
 
ClipboardManager $clipboard
 
bool $description_enabled = true
 
bool $preconditions_enabled = true
 
bool $properties_enabled = true
 
bool $commands_enabled = true
 
array $cust_prop = []
 
array $cust_commands = []
 
array $cust_modals = []
 
int $condition_depth = 0
 
bool $std_cmd_only = false
 
array $sub_item_html = []
 
bool $multi_download_enabled = false
 
int $download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE
 
int $obj_id
 
int $ref_id
 
int $sub_obj_id
 
string $sub_obj_type
 
ilAdvancedMDSubstitution $substitutions = null
 
bool $substitutions_enabled = false
 
bool $icons_enabled = false
 
bool $checkboxes_enabled = false
 
bool $position_enabled = false
 
bool $item_detail_links_enabled = false
 
array $item_detail_links = []
 
string $item_detail_links_intro = ''
 
bool $search_fragments_enabled = false
 
string $search_fragment = ''
 
bool $path_linked = false
 
int $relevance = 0
 
bool $expand_enabled = false
 
bool $is_expanded = true
 
bool $bold_title = false
 
int $details_level = self::DETAILS_ALL
 
int $reference_ref_id = 0
 
int $reference_obj_id = null
 
bool $separate_commands = false
 
bool $search_fragment_enabled = false
 
string $additional_information = ''
 
bool $repository_transfer_enabled = false
 
bool $shared = false
 
bool $restrict_to_goto = false
 
bool $comments_enabled = false
 
bool $comments_settings_enabled = false
 
bool $notes_enabled = false
 
bool $tags_enabled = false
 
bool $rating_enabled = false
 
bool $rating_categories_enabled = false
 
string $rating_text = null
 
array $rating_ctrl_path = null
 
bool $timings_enabled = true
 
bool $force_visible_only = false
 
array $prevent_duplicate_commands = []
 
int $parent_ref_id
 
string $title_link = ''
 
bool $title_link_disabled = false
 
bool $lp_cmd_enabled = false
 
bool $lp_settings_cmd_enabled = true
 
array $current_actions = []
 
ilPathGUI $path_gui = null
 
array $default_command_params = []
 
array $header_icons = []
 
object $container_obj = null
 
ilTemplate $tpl
 
string $position_value
 
int $path_start_node
 
array $default_command = []
 
bool $adm_commands_included
 
bool $prevent_access_caching
 
array $condition_target
 
array $notice_prop = []
 
string $ajax_hash
 
ilListItemAccessCache $acache
 
string $position_field_index = ''
 
string $title = ''
 
string $description = ''
 
ilWorkspaceAccessHandler $ws_access
 

Static Protected Attributes

static array $cnt_notes = []
 
static array $cnt_tags = []
 
static array $tags = []
 
static array $comments_activation = []
 
static bool $preload_done = false
 
static int $js_unique_id = 0
 
static string $tpl_file_name = 'tpl.container_list_item.html'
 
static string $tpl_component = 'components/ILIAS/Container'
 

Private Member Functions

 populateCommands (bool $for_header)
 insert all commands into html code More...
 
 commandsNeedToBeHidden (bool $for_header)
 Fix bug #12417: We hide the action menu when we are in the public area. More...
 
 getCommandsDropdown (string $title, bool $for_header=false)
 
 getTileImage ()
 
 insertLPSettingsCommand ()
 
 buildTranslatedType ()
 

Private Attributes

ILIAS Notes Service $notes_service
 

Detailed Description

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
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ addCustomCommand()

ilObjectListGUI::addCustomCommand ( string  $link,
string  $lang_var,
string  $frame = '',
string  $onclick = '' 
)

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

Referenced by ilDashboardRecommendedContentGUI\addCustomCommandsToActionMenu().

952  : void
953  {
954  $this->cust_commands[] = [
955  'link' => $link,
956  'lang_var' => $lang_var,
957  'frame' => $frame,
958  'onclick' => $onclick
959  ];
960  }
+ Here is the caller graph for this function:

◆ addCustomCommandButton()

ilObjectListGUI::addCustomCommandButton ( Button  $button,
?Modal  $triggeredModal = null 
)

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

References null.

965  : void {
966  $this->cust_commands[] = $button;
967  if ($triggeredModal !== null) {
968  $this->cust_modals[] = $triggeredModal;
969  }
970  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ addCustomProperty()

ilObjectListGUI::addCustomProperty ( string  $property = '',
string  $value = '',
bool  $alert = false,
bool  $newline = false 
)

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

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

911  : void {
912  $this->cust_prop[] = [
913  'property' => $property,
914  'value' => $value,
915  'alert' => $alert,
916  'newline' => $newline
917  ];
918  }
+ Here is the caller graph for this function:

◆ addHeaderGlyph()

ilObjectListGUI::addHeaderGlyph ( string  $id,
ILIAS\UI\Component\Symbol\Glyph\Glyph  $glyph,
  $onclick = null 
)

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

References $id.

Referenced by getHeaderAction().

2292  : void
2293  {
2294  $this->header_icons[$id] = ['glyph' => $glyph, 'onclick' => $onclick];
2295  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ addHeaderIcon()

ilObjectListGUI::addHeaderIcon ( string  $id,
string  $img,
?string  $tooltip = null,
?string  $onclick = null,
?string  $status_text = null,
?string  $href = null 
)

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

References $id.

2277  : void {
2278  $this->header_icons[$id] = [
2279  'img' => $img,
2280  'tooltip' => $tooltip,
2281  'onclick' => $onclick,
2282  'status_text' => $status_text,
2283  'href' => $href
2284  ];
2285  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ addHeaderIconHTML()

ilObjectListGUI::addHeaderIconHTML ( string  $id,
string  $html 
)

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

References $id.

Referenced by getHeaderAction().

2287  : void
2288  {
2289  $this->header_icons[$id] = $html;
2290  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ addSubItemHTML()

ilObjectListGUI::addSubItemHTML ( string  $html)

Add HTML for sub item (used for sessions)

Parameters
string$htmlsub items HTML

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

492  : void
493  {
494  $this->sub_item_html[] = $html;
495  }

◆ adminCommandsIncluded()

ilObjectListGUI::adminCommandsIncluded ( )

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

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

2687  : bool
2688  {
2690  }

◆ appendRepositoryFrameParameter()

ilObjectListGUI::appendRepositoryFrameParameter ( string  $link)

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

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

References ilUtil\appendUrlParameterString(), and ILIAS\Repository\refinery().

Referenced by insertTitle(), and populateCommands().

2486  : string
2487  {
2488  // we should get rid of this nonsense with 4.4 (alex)
2489  $base_class = $this->request_wrapper->retrieve('baseClass', $this->refinery->kindlyTo()->string());
2490  if (
2491  (strtolower($base_class) != 'ilrepositorygui') &&
2492  is_int(strpos($link, 'baseClass=ilRepositoryGUI'))
2493  ) {
2494  if ($this->type != 'frm') {
2495  $link = ilUtil::appendUrlParameterString($link, 'rep_frame=1');
2496  }
2497  }
2498 
2499  return $link;
2500  }
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildGotoLink()

ilObjectListGUI::buildGotoLink ( )
protected

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

References ilWorkspaceAccessHandler\getGotoLink(), and null.

Referenced by insertTitle().

1131  : ?string
1132  {
1133  switch ($this->context) {
1134  case self::CONTEXT_WORKSPACE_SHARING:
1135  return ilWorkspaceAccessHandler::getGotoLink($this->ref_id, $this->obj_id);
1136 
1137  default:
1138  // not implemented yet
1139  break;
1140  }
1141  return null;
1142  }
static getGotoLink(int $a_node_id, int $a_obj_id, string $a_additional="")
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTranslatedType()

ilObjectListGUI::buildTranslatedType ( )
private

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

3392  : string
3393  {
3394  if ($this->obj_definition->isPlugin($this->getIconImageType())) {
3395  return ilObjectPlugin::lookupTxtById($this->getIconImageType(), 'obj_' . $this->getIconImageType());
3396  }
3397 
3398  return $this->lng->txt('obj_' . $this->getIconImageType());
3399  }
getIconImageType()
Returns the icon image type.
static lookupTxtById(string $plugin_id, string $lang_var)

◆ checkCommandAccess()

ilObjectListGUI::checkCommandAccess ( string  $permission,
string  $cmd,
int  $ref_id,
string  $type,
?int  $obj_id = null 
)

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

References $access, $ref_id, ILIAS\Repository\access(), ilRBACAccessHandler\checkAccess(), isVisibleOnlyForced(), and null.

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

682  : bool {
683  // e.g: sub items should not be readable since their parent session is readonly.
684  if ($permission != 'visible' and $this->isVisibleOnlyForced()) {
685  return false;
686  }
687 
688  $cache_prefix = null;
689  if ($this->context == self::CONTEXT_WORKSPACE || $this->context == self::CONTEXT_WORKSPACE_SHARING) {
690  $cache_prefix = 'wsp';
691  if (!isset($this->ws_access)) {
692  $this->ws_access = new ilWorkspaceAccessHandler();
693  }
694  }
695 
696  if (isset($this->access_cache[$permission]['-' . $cmd][$cache_prefix . $ref_id])) {
697  return $this->access_cache[$permission]['-' . $cmd][$cache_prefix . $ref_id];
698  }
699 
700  if ($this->context == self::CONTEXT_REPOSITORY || $this->context == self::CONTEXT_SEARCH) {
701  $access = $this->access->checkAccess($permission, $cmd, $ref_id, $type, (int) $obj_id);
702  if ($this->access->getPreventCachingLastResult()) {
703  $this->prevent_access_caching = true;
704  }
705  } else {
706  $access = $this->ws_access->checkAccess($permission, $cmd, $ref_id, $type);
707  }
708 
709  $this->access_cache[$permission]['-' . $cmd][$cache_prefix . $ref_id] = $access;
710  return $access;
711  }
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAccessHandler $access
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkInfoPageOnAsynchronousRendering()

ilObjectListGUI::checkInfoPageOnAsynchronousRendering ( )

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

Referenced by commandsNeedToBeHidden().

3275  : bool
3276  {
3277  return false;
3278  }
+ Here is the caller graph for this function:

◆ commandsNeedToBeHidden()

ilObjectListGUI::commandsNeedToBeHidden ( bool  $for_header)
private

Fix bug #12417: We hide the action menu when we are in the public area.

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

References ANONYMOUS_USER_ID, checkInfoPageOnAsynchronousRendering(), and ILIAS\Repository\user().

Referenced by populateCommands().

2109  : bool {
2110  if (!$for_header
2111  && $this->user->getId() === ANONYMOUS_USER_ID && $this->checkInfoPageOnAsynchronousRendering()
2112  && $this->object_properties->getPropertyInfoTabVisibility()) {
2113  return true;
2114  }
2115  return false;
2116  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createDefaultCommand()

ilObjectListGUI::createDefaultCommand ( array  $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.

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

References $params, and ilLink\_getStaticLink().

Referenced by populateCommands().

772  : array
773  {
774  if ($this->static_link_enabled and !$this->default_command_params) {
775  if ($link = ilLink::_getStaticLink($this->ref_id, $this->type, false)) {
776  $command['link'] = $link;
777  $command['frame'] = '_top';
778  }
779  }
780  if ($this->default_command_params) {
781  $params = [];
782  foreach ($this->default_command_params as $name => $value) {
783  $params[] = $name . '=' . $value;
784  }
785  $params = implode('&', $params);
786 
787  if (!stristr($command['link'], '?')) {
788  $command['link'] .= '?' . $params;
789  } else {
790  $command['link'] .= '&' . $params;
791  }
792  }
793  return $command;
794  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineProperties()

ilObjectListGUI::determineProperties ( )

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

References $obj_id, $ref_id, $reference_obj_id, $reference_ref_id, ILIAS\Repository\access(), ANONYMOUS_USER_ID, getCustomProperties(), ilNoteGUI\getListCommentsJSCall(), ilLPStatus\getListGUIStatus(), ilNoteGUI\getListNotesJSCall(), ilTaggingGUI\getListTagsJSCall(), getProperties(), isCommentsActivated(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

Referenced by insertProperties().

1232  : array
1233  {
1234  $props = $this->getCustomProperties(
1235  $this->getProperties()
1236  );
1237 
1238  if ($this->context != self::CONTEXT_WORKSPACE && $this->context != self::CONTEXT_WORKSPACE_SHARING) {
1239  // add learning progress custom property
1240  $lp = ilLPStatus::getListGUIStatus($this->obj_id);
1241  if ($lp) {
1242  $props[] = [
1243  'alert' => false,
1244  'property' => $this->lng->txt('learning_progress'),
1245  'value' => $lp,
1246  'newline' => true
1247  ];
1248  }
1249 
1250  // add no item access note in public section
1251  // for items that are visible but not readable
1252  if ($this->user->getId() === ANONYMOUS_USER_ID) {
1253  if (!$this->access->checkAccess('read', '', $this->ref_id, $this->type, $this->obj_id)) {
1254  $props[] = [
1255  'alert' => true,
1256  'value' => $this->lng->txt('no_access_item_public'),
1257  'newline' => true
1258  ];
1259  }
1260  }
1261  }
1262 
1263  // reference objects have translated ids, revert to originals
1264  $note_ref_id = $this->ref_id;
1265  $note_obj_id = $this->obj_id;
1266  if ($this->reference_ref_id) {
1267  $note_ref_id = $this->reference_ref_id;
1268  $note_obj_id = $this->reference_obj_id;
1269  }
1270  $redraw_js = 'il.Object.redrawListItem(' . $note_ref_id . ');';
1271 
1272  // add common properties (comments, notes, tags)
1273  if (
1274  (
1275  (
1276  isset(self::$cnt_notes[$note_obj_id][Note::PRIVATE]) &&
1277  self::$cnt_notes[$note_obj_id][Note::PRIVATE] > 0
1278  ) || (
1279  isset(self::$cnt_notes[$note_obj_id][Note::PUBLIC]) &&
1280  self::$cnt_notes[$note_obj_id][Note::PUBLIC] > 0
1281  ) || (
1282  isset(self::$cnt_tags[$note_obj_id]) && self::$cnt_tags[$note_obj_id] > 0
1283  ) || (
1284  isset(self::$tags[$note_obj_id]) && is_array(self::$tags[$note_obj_id])
1285  )
1286  ) && ($this->user->getId() !== ANONYMOUS_USER_ID)
1287  ) {
1288  $nl = true;
1289  $cnt_comments = self::$cnt_notes[$note_obj_id][Note::PUBLIC] ?? 0;
1290  if ($this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, false, false)
1291  && $cnt_comments > 0) {
1292  $props[] = [
1293  'alert' => false,
1294  'property' => $this->lng->txt('notes_comments'),
1295  'value' =>
1296  '<a href="#" onclick="return ' .
1297  ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $redraw_js) . '">' .
1298  self::$cnt_notes[$note_obj_id][Note::PUBLIC] . '</a>',
1299  'newline' => $nl
1300  ];
1301  $nl = false;
1302  }
1303 
1304  $cnt_notes = self::$cnt_notes[$note_obj_id][Note::PRIVATE] ?? 0;
1305  if ($this->notes_enabled && $cnt_notes > 0) {
1306  $props[] = [
1307  'alert' => false,
1308  'property' => $this->lng->txt('notes'),
1309  'value' =>
1310  '<a href="#" onclick="return ' .
1311  ilNoteGUI::getListNotesJSCall($this->ajax_hash, $redraw_js) . '">' .
1312  self::$cnt_notes[$note_obj_id][Note::PRIVATE] . '</a>',
1313  'newline' => $nl
1314  ];
1315  $nl = false;
1316  }
1317  $cnt_tags = self::$cnt_tags[$note_obj_id] ?? 0;
1318  if ($this->tags_enabled && ($cnt_tags > 0 || isset(self::$tags[$note_obj_id]))) {
1319  $tags_set = new ilSetting('tags');
1320  if ($tags_set->get('enable')) {
1321  $tags_url = ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $redraw_js);
1322 
1323  // list object tags
1324  if (isset(self::$tags[$note_obj_id])) {
1325  $tags_tmp = [];
1326  foreach (self::$tags[$note_obj_id] as $tag => $is_tag_owner) {
1327  if ($is_tag_owner) {
1328  $tags_tmp[] = '<a class="ilTag ilTagRelHigh" href="#" onclick="return ' .
1329  $tags_url . '">' . $tag . '</a>';
1330  } else {
1331  $tags_tmp[] = '<span class="ilTag ilTagRelMiddle">' . $tag . '</span>';
1332  }
1333  }
1334  $tags_value = implode(' ', $tags_tmp);
1335  $nl = true;
1336  $prop_text = '';
1337  } // tags counter
1338  else {
1339  $tags_value = '<a href="#" onclick="return ' . $tags_url . '>' .
1340  self::$cnt_tags[$note_obj_id] . '</a>';
1341  $prop_text = $this->lng->txt('tagging_tags');
1342  }
1343  $props[] = [
1344  'alert' => false,
1345  'property' => $prop_text,
1346  'value' => $tags_value,
1347  'newline' => $nl
1348  ];
1349  }
1350  }
1351  }
1352 
1353  if (!isset($props)) {
1354  return [];
1355  }
1356 
1357  return $props;
1358  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
getProperties()
Get item properties.
static getListTagsJSCall(string $a_hash, ?string $a_update_code=null)
isCommentsActivated(string $type, int $ref_id, int $obj_id, bool $header_actions, bool $check_write_access=true)
Check comments status against comments settings and context.
static getListGUIStatus(int $a_obj_id, bool $a_image_only=true)
getCustomProperties(array $prop)
static getListCommentsJSCall(string $a_hash, ?string $a_update_code=null)
Get list comments js call.
static getListNotesJSCall(string $a_hash, ?string $a_update_code=null)
Get list notes js call.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disableTitleLink()

ilObjectListGUI::disableTitleLink ( bool  $status)

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

Referenced by ilObjTestListGUI\initItem().

757  : void
758  {
759  $this->title_link_disabled = $status;
760  }
+ Here is the caller graph for this function:

◆ enableCheckbox()

ilObjectListGUI::enableCheckbox ( bool  $status)

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

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

354  : void
355  {
356  $this->checkboxes_enabled = $status;
357  }
+ Here is the caller graph for this function:

◆ enableCommands()

ilObjectListGUI::enableCommands ( bool  $status,
bool  $std_only = false 
)

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

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

456  : void
457  {
458  $this->commands_enabled = $status;
459  $this->std_cmd_only = $std_only;
460  }
+ Here is the caller graph for this function:

◆ enableComments()

ilObjectListGUI::enableComments ( bool  $value,
bool  $enable_comments_settings = true 
)

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

References ILIAS\Repository\settings().

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

2118  : void
2119  {
2120  if ($this->settings->get('disable_comments')) {
2121  $value = false;
2122  }
2123 
2124  $this->comments_enabled = $value;
2125  $this->comments_settings_enabled = $enable_comments_settings;
2126  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableCopy()

ilObjectListGUI::enableCopy ( bool  $status)

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

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

414  : void
415  {
416  $this->copy_enabled = $status;
417  }
+ Here is the caller graph for this function:

◆ enableCut()

ilObjectListGUI::enableCut ( bool  $status)

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

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

404  : void
405  {
406  $this->cut_enabled = $status;
407  }
+ Here is the caller graph for this function:

◆ enableDelete()

ilObjectListGUI::enableDelete ( bool  $status)

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

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

394  : void
395  {
396  $this->delete_enabled = $status;
397  }
+ Here is the caller graph for this function:

◆ enableDescription()

ilObjectListGUI::enableDescription ( bool  $status)

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

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

309  : void
310  {
311  $this->description_enabled = $status;
312  }
+ Here is the caller graph for this function:

◆ enableDownloadCheckbox()

ilObjectListGUI::enableDownloadCheckbox ( int  $ref_id)

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

References ILIAS\Repository\access(), and getContainerObject().

2214  : void
2215  {
2216  // TODO: delegate to list object class!
2217  if (!$this->getContainerObject()->isActiveAdministrationPanel() || $this->clipboard->hasEntries()) {
2218  if (
2219  in_array($this->type, ['file', 'fold']) &&
2220  $this->access->checkAccess('read', '', $ref_id, $this->type)
2221  ) {
2222  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_ENABLED;
2223  } else {
2224  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_DISABLED;
2225  }
2226  } else {
2227  $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE;
2228  }
2229  }
+ Here is the call graph for this function:

◆ enableExpand()

ilObjectListGUI::enableExpand ( bool  $status)

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

364  : void
365  {
366  $this->expand_enabled = $status;
367  }

◆ enableIcon()

ilObjectListGUI::enableIcon ( bool  $status)

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

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

344  : void
345  {
346  $this->icons_enabled = $status;
347  }
+ Here is the caller graph for this function:

◆ enableInfoScreen()

ilObjectListGUI::enableInfoScreen ( bool  $info_screen)

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

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

467  : void
468  {
469  $this->info_screen_enabled = $info_screen;
470  }
+ Here is the caller graph for this function:

◆ enableItemDetailLinks()

ilObjectListGUI::enableItemDetailLinks ( bool  $status)

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

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

521  : void
522  {
523  $this->item_detail_links_enabled = $status;
524  }

◆ enableLearningProgress()

ilObjectListGUI::enableLearningProgress ( bool  $enabled)
protected

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

Referenced by ilObjFileBasedLMListGUI\init(), ilObjLearningModuleListGUI\init(), and ilObjTestListGUI\initItem().

477  : void
478  {
479  $this->lp_cmd_enabled = $enabled;
480  }
+ Here is the caller graph for this function:

◆ enableLink()

ilObjectListGUI::enableLink ( bool  $status)

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

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

434  : void
435  {
436  $this->link_enabled = $status;
437  }
+ Here is the caller graph for this function:

◆ enableLinkedPath()

ilObjectListGUI::enableLinkedPath ( bool  $status)

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

329  : void
330  {
331  $this->path_linked = $status;
332  }

◆ enableLPSettingsCommand()

ilObjectListGUI::enableLPSettingsCommand ( bool  $enabled)
protected

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

Referenced by ilObjTestListGUI\initItem().

482  : void
483  {
484  $this->lp_settings_cmd_enabled = $enabled;
485  }
+ Here is the caller graph for this function:

◆ enableMultiDownload()

ilObjectListGUI::enableMultiDownload ( bool  $value)

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

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

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

Referenced by ilObjTestListGUI\initItem().

2168  : void
2169  {
2170  $folder_set = new ilSetting('fold');
2171  if (!$folder_set->get('enable_multi_download')) {
2172  $value = false;
2173  }
2174  $this->multi_download_enabled = $value;
2175  }
+ Here is the caller graph for this function:

◆ enableNotes()

ilObjectListGUI::enableNotes ( bool  $value)

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

References ILIAS\Repository\settings().

Referenced by ilObjTestListGUI\initItem().

2128  : void
2129  {
2130  if ($this->settings->get('disable_notes')) {
2131  $value = false;
2132  }
2133 
2134  $this->notes_enabled = $value;
2135  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableNoticeProperties()

ilObjectListGUI::enableNoticeProperties ( bool  $status)

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

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

299  : void
300  {
301  $this->notice_properties_enabled = $status;
302  }
+ Here is the caller graph for this function:

◆ enablePath()

ilObjectListGUI::enablePath ( bool  $path,
int  $start_node = 0,
?\ilPathGUI  $path_gui = null 
)

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

References $path, and $path_gui.

444  : void
445  {
446  $this->path_enabled = $path;
447  $this->path_start_node = $start_node;
448  $this->path_gui = $path_gui;
449  }
$path
Definition: ltiservices.php:29

◆ enablePreconditions()

ilObjectListGUI::enablePreconditions ( bool  $status)

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

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

289  : void
290  {
291  $this->preconditions_enabled = $status;
292  }
+ Here is the caller graph for this function:

◆ enableProgressInfo()

ilObjectListGUI::enableProgressInfo ( bool  $status)

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

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

497  : void
498  {
499  $this->progress_enabled = $status;
500  }
+ Here is the caller graph for this function:

◆ enableProperties()

ilObjectListGUI::enableProperties ( bool  $status)

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

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

279  : void
280  {
281  $this->properties_enabled = $status;
282  }
+ Here is the caller graph for this function:

◆ enableRating()

ilObjectListGUI::enableRating ( bool  $value,
?string  $text = null,
bool  $categories = false,
?array  $ctrl_path = null,
bool  $force_rate_parent = false 
)

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

References $force_rate_parent.

2152  : void {
2153  $this->rating_enabled = $value;
2154 
2155  if ($this->rating_enabled) {
2156  $this->rating_categories_enabled = $categories;
2157  $this->rating_text = $text;
2158  $this->rating_ctrl_path = $ctrl_path;
2159  $this->force_rate_parent = $force_rate_parent;
2160  }
2161  }

◆ enableRepositoryTransfer()

ilObjectListGUI::enableRepositoryTransfer ( bool  $value)

Enable copy/move to repository (from personal workspace)

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

658  : void
659  {
660  $this->repository_transfer_enabled = $value;
661  }

◆ enableSearchFragments()

ilObjectListGUI::enableSearchFragments ( bool  $status)

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

319  : void
320  {
321  $this->search_fragment_enabled = $status;
322  }

◆ enableSubscribe()

ilObjectListGUI::enableSubscribe ( bool  $status)

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

Referenced by ilObjCourseGUI\_modifyItemGUI(), ilStudyProgrammeIndividualPlanProgressListGUI\configureItemGUI(), ilStudyProgrammeExpandableProgressListGUI\configureItemGUI(), and ilObjTestListGUI\initItem().

424  : void
425  {
426  $this->subscribe_enabled = $status;
427  }
+ Here is the caller graph for this function:

◆ enableSubstitutions()

ilObjectListGUI::enableSubstitutions ( bool  $status)

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

Referenced by ilObjIndividualAssessmentListGUI\init(), ilObjGroupListGUI\init(), and ilObjSessionListGUI\init().

507  : void
508  {
509  $this->substitutions_enabled = $status;
510  }
+ Here is the caller graph for this function:

◆ enableTags()

ilObjectListGUI::enableTags ( bool  $value)

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

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

2137  : void
2138  {
2139  $tags_set = new ilSetting('tags');
2140  if (!$tags_set->get('enable')) {
2141  $value = false;
2142  }
2143  $this->tags_enabled = $value;
2144  }
+ Here is the caller graph for this function:

◆ enableTimings()

ilObjectListGUI::enableTimings ( bool  $status)

enable timings link

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

Referenced by ilObjTestListGUI\initItem().

3032  : void
3033  {
3034  $this->timings_enabled = $status;
3035  }
+ Here is the caller graph for this function:

◆ forceVisibleOnly()

ilObjectListGUI::forceVisibleOnly ( bool  $stat)

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

972  : void
973  {
974  $this->force_visible_only = $stat;
975  }

◆ getAdditionalInformation()

ilObjectListGUI::getAdditionalInformation ( )

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

References $additional_information.

635  : ?string
636  {
638  }

◆ getAlertProperties()

ilObjectListGUI::getAlertProperties ( )

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

References getProperties().

930  : array
931  {
932  $alert = [];
933  foreach ($this->getProperties() as $prop) {
934  if (isset($prop['alert']) && $prop['alert'] == true) {
935  $alert[] = $prop;
936  }
937  }
938  return $alert;
939  }
getProperties()
Get item properties.
+ Here is the call graph for this function:

◆ getAsCard()

ilObjectListGUI::getAsCard ( int  $ref_id,
int  $obj_id,
string  $type,
string  $title,
string  $description 
)

Get card object.

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

Referenced by ilObjTestListGUI\addCommandLinkParameter().

3122  : ?RepositoryObject {
3123  $ui = $this->ui;
3124 
3125  $title = $this->refinery->encode()->htmlSpecialCharsAsEntities()->transform($title);
3126  // even b tag produced bugs, see #32304
3127  $description = $this->refinery->encode()->htmlSpecialCharsAsEntities()->transform(
3128  $description
3129  );
3130 
3131  $this->initItem(
3132  $ref_id,
3133  $obj_id,
3134  $type,
3135  $title,
3136  $description
3137  );
3138 
3139  $user = $this->user;
3141 
3142  $this->enableCommands(true);
3143 
3144  $sections = [];
3145  if ($description !== '') {
3146  $sections[] = $ui->factory()->legacy()->content('<div class="il-multi-line-cap-3">' . $description . '</div>');
3147  }
3148 
3149  $this->populateCommands(false);
3150 
3151  $def_command = $this->getDefaultCommand();
3152 
3153  $dropdown = $this->getCommandsDropdown($title);
3154 
3155  // workaround for #26205
3156  // we should get rid of _top links completely and gifure our how
3157  // to manage scorm links better
3158  $def_cmd_frame = ($def_command['frame'] ?? '');
3159  if ($def_cmd_frame === '_top') {
3160  $def_cmd_frame = '';
3161  }
3162  $def_cmd_link = ($def_command['link'] ?? '');
3163 
3164  // workaround for scorm
3165  list($modified_link, $def_cmd_frame) =
3166  $this->modifySAHSlaunch($def_cmd_link, $def_cmd_frame);
3167 
3168  $image = $this->getTileImage();
3169 
3170  if ($def_cmd_link != '') { // #24256
3171  if ($def_cmd_frame !== '' && ($modified_link === $def_cmd_link)) {
3172  $signal = (new SignalGenerator())->create();
3173  $this->main_tpl->addOnLoadCode(
3174  "$(document).on('{$signal->getId()}', function(event, signalData) {"
3175  . ' window.open("' . str_replace(
3176  '&amp;',
3177  '&',
3178  $def_cmd_link
3179  ) . '", "' . $def_cmd_frame . '");'
3180  . '});'
3181  );
3182 
3183  $image = $image->withAction($signal);
3184 
3185  $button =
3186  $ui->factory()->button()->shy($title, '')->appendOnClick($signal);
3187  $title = $ui->renderer()->render($button);
3188  } else {
3189  $image = $image->withAction($modified_link);
3190  }
3191  }
3192 
3193  if ($type == 'sess') {
3194  if ($title != '') {
3195  $title = ': ' . $title;
3196  }
3199  $app_info['start'],
3200  $app_info['end'],
3201  (bool) $app_info['fullday']
3202  ) . $title;
3203  }
3204 
3205  $icon = $this->ui->factory()->symbol()->icon()->custom(
3206  $this->getTypeIcon(),
3207  $this->buildTranslatedType(),
3208  'medium'
3209  );
3210 
3211  // card title action
3212  $card_title_action = '';
3213  if ($def_cmd_link != '' && ($def_cmd_frame == '' || $modified_link != $def_cmd_link)) { // #24256
3214  $card_title_action = $modified_link;
3215  } elseif ($def_cmd_link == '' &&
3216  $this->getInfoScreenStatus() &&
3218  $user->getId(),
3219  'visible',
3220  '',
3221  $ref_id
3222  )) {
3223  $card_title_action = ilLink::_getLink($ref_id);
3224  if ($image->getAction() == '') {
3225  $image = $image->withAction($card_title_action);
3226  }
3227  }
3228 
3229  $card = $ui->factory()->card()->repositoryObject(
3230  $title . '<span data-list-item-id="' . $this->getUniqueItemId(true) . '"></span>',
3231  $image
3232  )->withObjectIcon(
3233  $icon
3234  )->withActions(
3235  $dropdown
3236  );
3237 
3238  if ($card_title_action != '') {
3239  $card = $card->withTitleAction($card_title_action);
3240  }
3241 
3242  $l = [];
3243  foreach ($this->determineProperties() as $p) {
3244  if (isset($p['alert']) && $p['alert'] == true
3245  && isset($p['property']) && $p['property'] !== $this->lng->txt('learning_progress')) {
3246  $l[(string) $p['property']] = (string) $p['value'];
3247  }
3248  }
3249  if (count($l) > 0) {
3250  $prop_list = $ui->factory()->listing()->descriptive($l);
3251  $sections[] = $prop_list;
3252  }
3253  if (count($sections) > 0) {
3254  $card = $card->withSections($sections);
3255  }
3256 
3257  $lp = ilLPStatus::getListGUIStatus($obj_id, false);
3258  if (is_array($lp) && array_key_exists('status', $lp)) {
3259  $percentage = (int) ilLPStatus::_lookupPercentage($obj_id, $this->user->getId());
3260  if ($lp['status'] == ilLPStatus::LP_STATUS_COMPLETED_NUM) {
3261  $percentage = 100;
3262  }
3263 
3264  $card = $card->withProgress(
3265  $ui->factory()
3266  ->chart()
3267  ->progressMeter()
3268  ->mini(100, $percentage)
3269  );
3270  }
3271 
3272  return $card;
3273  }
const LP_STATUS_COMPLETED_NUM
modifySAHSlaunch(string $link, string $target)
workaround: SAHS in new javavasript-created window or iframe
getTypeIcon()
Get object type specific type icon.
enableCommands(bool $status, bool $std_only=false)
getUniqueItemId(bool $as_div=false)
Get unique item identifier (for js-actions)
initItem(int $ref_id, int $obj_id, string $type, string $title='', string $description='')
initialize new item (is called by getItemHTML())
static _lookupPercentage(int $a_obj_id, int $a_user_id)
Lookup percentage.
ilAccessHandler $access
getCommandsDropdown(string $title, bool $for_header=false)
static _lookupAppointment(int $a_obj_id)
renderer()
Get a renderer for UI components.
Definition: UIServices.php:44
static getListGUIStatus(int $a_obj_id, bool $a_image_only=true)
populateCommands(bool $for_header)
insert all commands into html code
static _appointmentToString(int $start, int $end, bool $fulltime)
factory()
Get the factory that crafts UI components.
Definition: UIServices.php:36
checkAccessOfUser(int $a_user_id, string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
+ Here is the caller graph for this function:

◆ getAsListItem()

ilObjectListGUI::getAsListItem ( int  $ref_id,
int  $obj_id,
string  $type,
string  $title,
string  $description 
)

Get list item ui object.

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

3046  : ?Item {
3047  $ui = $this->ui;
3048 
3049  // even b tag produced bugs, see #32304
3050  $description = $this->refinery->encode()->htmlSpecialCharsAsEntities()->transform(
3051  $description
3052  );
3053 
3054  $this->initItem(
3055  $ref_id,
3056  $obj_id,
3057  $type,
3058  $title,
3059  $description
3060  );
3061 
3062  $this->enableCommands(true);
3063 
3064  // actions
3065  $this->populateCommands(false);
3066 
3067  $dropdown = $this->getCommandsDropdown($title);
3068  $def_command = $this->getDefaultCommand();
3069 
3070  if ($def_command['link'] ?? false) {
3071  list($def_command['link'], $def_command['frame']) =
3072  $this->modifySAHSlaunch($def_command['link'], $def_command['frame']);
3073  $new_viewport = !in_array($def_command['frame'], ['', '_top', '_self', '_parent'], true);
3074  $link = $this->ui->factory()
3075  ->link()
3076  ->standard($this->getTitle(), $def_command['link'])
3077  ->withOpenInNewViewport($new_viewport);
3078  $list_item = $ui->factory()->item()->standard($link);
3079  } else {
3080  $list_item = $ui->factory()->item()->standard($this->getTitle());
3081  }
3082 
3083  if ($description != '') {
3084  $list_item = $list_item->withDescription($description);
3085  }
3086  $list_item = $list_item->withActions($dropdown)->withLeadIcon(
3087  $this->ui->factory()->symbol()->icon()->custom(
3088  $this->getTypeIcon(),
3089  $this->buildTranslatedType(),
3090  'medium'
3091  )
3092  );
3093 
3094 
3095  $l = [];
3096  $this->enableComments(true);
3097  $this->enableNotes(true);
3098  $this->enableTags(true);
3099  $this->enableRating(true);
3100 
3101  foreach ($this->determineProperties() as $p) {
3102  //if ($p['property'] !== $this->lng->txt('learning_progress')) {
3103  $l[(string) $p['property']] = (string) $p['value'];
3104  //}
3105  }
3106  if (count($l) > 0) {
3107  $list_item = $list_item->withProperties($l);
3108  }
3109 
3110  return $list_item;
3111  }
modifySAHSlaunch(string $link, string $target)
workaround: SAHS in new javavasript-created window or iframe
getTypeIcon()
Get object type specific type icon.
enableCommands(bool $status, bool $std_only=false)
initItem(int $ref_id, int $obj_id, string $type, string $title='', string $description='')
initialize new item (is called by getItemHTML())
getCommandsDropdown(string $title, bool $for_header=false)
enableComments(bool $value, bool $enable_comments_settings=true)
Common interface to all items.
Definition: Item.php:31
enableRating(bool $value, ?string $text=null, bool $categories=false, ?array $ctrl_path=null, bool $force_rate_parent=false)
populateCommands(bool $for_header)
insert all commands into html code
getTitle()
getTitle overwritten in class.ilObjLinkResourceList.php
factory()
Get the factory that crafts UI components.
Definition: UIServices.php:36

◆ getCheckboxStatus()

ilObjectListGUI::getCheckboxStatus ( )

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

References $checkboxes_enabled.

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

359  : bool
360  {
362  }
+ Here is the caller graph for this function:

◆ getCommandFrame()

ilObjectListGUI::getCommandFrame ( string  $cmd)

Get command target frame.

Overwrite this method if link frame is not current frame

Parameters
string$cmdcommand
Returns
string command target frame

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

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

833  : string
834  {
835  return '';
836  }
+ Here is the caller graph for this function:

◆ getCommandId()

ilObjectListGUI::getCommandId ( )

get command id Normally the ref id.

Overwritten for course and category references

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

References $ref_id.

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

625  : int
626  {
627  return $this->ref_id;
628  }
+ Here is the caller graph for this function:

◆ getCommandImage()

ilObjectListGUI::getCommandImage ( string  $cmd)

Get command icon image.

Overwrite this method if an icon is provided

Parameters
string$cmdcommand
Returns
string image path

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

Referenced by getCommands().

846  : string
847  {
848  return '';
849  }
+ Here is the caller graph for this function:

◆ getCommandLink()

ilObjectListGUI::getCommandLink ( string  $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.

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

References ilDAVActivationChecker\_isActive(), ILIAS\Repository\ctrl(), getCommandId(), ilWebDAVUriBuilder\getUriToMountInstructionModalByRef(), and ILIAS\FileDelivery\http().

Referenced by getCommands(), ilObjBlogListGUI\insertCommand(), and insertInfoScreenCommand().

804  : string
805  {
806  if ($this->context == self::CONTEXT_REPOSITORY || $this->context == self::CONTEXT_SEARCH) {
807  // BEGIN WebDAV Get mount webfolder link.
808  if ($cmd == 'mount_webfolder' && ilDAVActivationChecker::_isActive()) {
809  $uri_builder = new ilWebDAVUriBuilder($this->http->request());
810  return $uri_builder->getUriToMountInstructionModalByRef($this->ref_id);
811  }
812  // END WebDAV Get mount webfolder link.
813 
814  $this->ctrl->setParameterByClass('ilrepositorygui', 'ref_id', $this->getCommandId());
815  $cmd_link = $this->ctrl->getLinkTargetByClass('ilrepositorygui', $cmd);
816  $this->ctrl->setParameterByClass('ilrepositorygui', 'ref_id', $this->requested_ref_id);
817  return $cmd_link;
818  }
819 
820  $this->ctrl->setParameterByClass($this->gui_class_name, 'ref_id', '');
821  $this->ctrl->setParameterByClass($this->gui_class_name, 'wsp_id', $this->ref_id);
822  return $this->ctrl->getLinkTargetByClass($this->gui_class_name, $cmd);
823  }
static http()
Fetches the global http state from ILIAS.
getCommandId()
get command id Normally the ref id.
getUriToMountInstructionModalByRef(int $a_ref_id)
+ 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 because 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 1005 of file class.ilObjectListGUI.php.

References $txt, ILIAS\Repository\access(), ANONYMOUS_USER_ID, checkCommandAccess(), getCommandFrame(), getCommandImage(), getCommandLink(), null, and ILIAS\Repository\user().

Referenced by populateCommands().

1005  : array
1006  {
1007  $ref_commands = [];
1008  foreach ($this->commands as $command) {
1009  $permission = $command['permission'];
1010  $cmd = $command['cmd'];
1011  $lang_var = $command['lang_var'] ?? '';
1012  $txt = '';
1013  $info_object = null;
1014  $cmd_link = '';
1015  $cmd_frame = '';
1016  $cmd_image = '';
1017  $access_granted = false;
1018 
1019  if (isset($command['txt'])) {
1020  $txt = $command['txt'];
1021  }
1022 
1023  // Suppress commands that don't make sense for anonymous users
1024  if (
1025  $this->user->getId() == ANONYMOUS_USER_ID &&
1026  (isset($command['enable_anonymous']) && $command['enable_anonymous'] == 'false')
1027  ) {
1028  continue;
1029  }
1030 
1031  // all access checking should be made within $this->access and
1032  // the checkAccess of the ilObj...Access classes
1033  // $access = $this->access->checkAccess($permission, $cmd, $this->ref_id, $this->type);
1034  $access = $this->checkCommandAccess($permission, $cmd, $this->ref_id, $this->type);
1035 
1036  if ($access) {
1037  $access_granted = true;
1038  $cmd_link = $this->getCommandLink($command['cmd']);
1039  $cmd_frame = $this->getCommandFrame($command['cmd']);
1040  $cmd_image = $this->getCommandImage($command['cmd']);
1041  } else {
1042  $info_object = $this->access->getInfo();
1043  }
1044 
1045  if (!isset($command['default'])) {
1046  $command['default'] = '';
1047  }
1048  $ref_commands[] = [
1049  'permission' => $permission,
1050  'cmd' => $cmd,
1051  'link' => $cmd_link,
1052  'frame' => $cmd_frame,
1053  'lang_var' => $lang_var,
1054  'txt' => $txt,
1055  'granted' => $access_granted,
1056  'access_info' => $info_object,
1057  'img' => $cmd_image,
1058  'default' => $command['default']
1059  ];
1060  }
1061 
1062  return $ref_commands;
1063  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getCommandFrame(string $cmd)
Get command target frame.
ilAccessHandler $access
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCommandImage(string $cmd)
Get command icon image.
$txt
Definition: error.php:31
getCommandLink(string $cmd)
Get command link url.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCommandsDropdown()

ilObjectListGUI::getCommandsDropdown ( string  $title,
bool  $for_header = false 
)
private

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

Referenced by getHeaderAction().

2913  {
2914  $this->populateCommands($for_header);
2915  return $this->ui->factory()
2916  ->dropdown()
2917  ->standard($this->current_actions)
2918  ->withAriaLabel(sprintf(
2919  $this->lng->txt('actions_for'),
2920  htmlspecialchars(addslashes($title))
2921  ));
2922  }
populateCommands(bool $for_header)
insert all commands into html code
+ Here is the caller graph for this function:

◆ getCommandsHTML()

ilObjectListGUI::getCommandsHTML ( string  $title = '')

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

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

2907  : string
2908  {
2909  return $this->ui->renderer()->render($this->getCommandsDropdown($title, false));
2910  }
getCommandsDropdown(string $title, bool $for_header=false)

◆ getCommandsStatus()

ilObjectListGUI::getCommandsStatus ( )

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

References $commands_enabled.

Referenced by ilObjLTIConsumerListGUI\insertIconsAndCheckboxes(), ilCourseObjectiveListGUI\insertTitle(), insertTitle(), and populateCommands().

462  : bool
463  {
465  }
+ Here is the caller graph for this function:

◆ getContainerObject()

ilObjectListGUI::getContainerObject ( )

◆ getCopyStatus()

ilObjectListGUI::getCopyStatus ( )

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

References $copy_enabled.

419  : bool
420  {
421  return $this->copy_enabled;
422  }

◆ getCustomProperties()

ilObjectListGUI::getCustomProperties ( array  $prop)

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

Referenced by determineProperties().

920  : array
921  {
922  if (is_array($this->cust_prop)) {
923  foreach ($this->cust_prop as $property) {
924  $prop[] = $property;
925  }
926  }
927  return $prop;
928  }
+ Here is the caller graph for this function:

◆ getCutStatus()

ilObjectListGUI::getCutStatus ( )

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

References $cut_enabled.

409  : bool
410  {
411  return $this->cut_enabled;
412  }

◆ getDefaultCommand()

ilObjectListGUI::getDefaultCommand ( )

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

References $default_command.

671  : array
672  {
673  return $this->default_command;
674  }

◆ getDeleteStatus()

ilObjectListGUI::getDeleteStatus ( )

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

References $delete_enabled.

399  : bool
400  {
401  return $this->delete_enabled;
402  }

◆ getDescription()

ilObjectListGUI::getDescription ( )

getDescription overwritten in class.ilObjLinkResourceList.php

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

References $description.

Referenced by insertDescription().

592  : string
593  {
594  return $this->description;
595  }
+ Here is the caller graph for this function:

◆ getDescriptionStatus()

ilObjectListGUI::getDescriptionStatus ( )

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

References $description_enabled.

314  : bool
315  {
317  }

◆ getDetailsLevel()

ilObjectListGUI::getDetailsLevel ( )

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

References $details_level.

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

650  : int
651  {
652  return $this->details_level;
653  }
+ Here is the caller graph for this function:

◆ getDownloadCheckboxState()

ilObjectListGUI::getDownloadCheckboxState ( )

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

References $download_checkbox_state.

Referenced by ilObjLTIConsumerListGUI\insertIconsAndCheckboxes().

2231  : int
2232  {
2234  }
+ Here is the caller graph for this function:

◆ getExpandStatus()

ilObjectListGUI::getExpandStatus ( )

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

References $expand_enabled.

Referenced by ilObjLTIConsumerListGUI\insertIconsAndCheckboxes().

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

◆ getHeaderAction()

ilObjectListGUI::getHeaderAction ( ?ilGlobalTemplateInterface  $main_tpl = null)

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

References $ajax_hash, Vendor\Package\$f, $id, $main_tpl, $obj_id, $renderer, ilObject\_lookupTitle(), ilObject\_lookupType(), addHeaderGlyph(), addHeaderIconHTML(), ILIAS\UICore\GlobalTemplate\addOnLoadCode(), ILIAS\Repository\ctrl(), getCommandsDropdown(), ilNoteGUI\getListCommentsJSCall(), ilNoteGUI\getListNotesJSCall(), ilTaggingGUI\getListTagsJSCall(), ilTagging\getTagsForUserAndObject(), isCommentsActivated(), ILIAS\Repository\lng(), null, ilCommonActionDispatcherGUI\removeSubObjFromAjaxHash(), setTitle(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

2302  : string
2303  {
2304  if ($main_tpl == null) {
2306  }
2307 
2308  $htpl = new ilTemplate('tpl.header_action.html', true, true, 'components/ILIAS/ILIASObject');
2309 
2310  $redraw_js = 'il.Object.redrawActionHeader();';
2311 
2312  // tags
2313  if ($this->tags_enabled) {
2315  $this->obj_id,
2316  ilObject::_lookupType($this->obj_id),
2317  0,
2318  '',
2319  $this->user->getId()
2320  );
2321  if (count($tags) > 0) {
2322  $this->lng->loadLanguageModule('tagging');
2323 
2324  $f = $this->ui->factory();
2325  $this->addHeaderGlyph(
2326  'tags',
2327  $f->symbol()->glyph()->tag('#')
2328  ->withCounter($f->counter()->status(count($tags))),
2329  ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $redraw_js)
2330  );
2331  }
2332  }
2333 
2334  // notes and comments
2335  $comments_enabled = $this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, true, false);
2336  if ($this->notes_enabled || $comments_enabled) {
2337  $type = ($this->sub_obj_type == '') ? $this->type : $this->sub_obj_type;
2338  $context = $this->notes_service->data()->context($this->obj_id, $this->sub_obj_id, $type);
2339  $cnt[$this->obj_id][Note::PUBLIC] = $this->notes_service->domain()->getNrOfCommentsForContext($context);
2340  $cnt[$this->obj_id][Note::PRIVATE] = $this->notes_service->domain()->getNrOfNotesForContext($context);
2341  if (
2342  $this->notes_enabled &&
2343  isset($cnt[$this->obj_id][Note::PRIVATE]) &&
2344  $cnt[$this->obj_id][Note::PRIVATE] > 0
2345  ) {
2346  $f = $this->ui->factory();
2347  $this->addHeaderGlyph(
2348  'notes',
2349  $f->symbol()->glyph()->note('#')
2350  ->withCounter($f->counter()->status((int) $cnt[$this->obj_id][Note::PRIVATE])),
2351  ilNoteGUI::getListNotesJSCall($this->ajax_hash, $redraw_js)
2352  );
2353  }
2354 
2355  if (
2356  $comments_enabled &&
2357  isset($cnt[$this->obj_id][Note::PUBLIC]) &&
2358  $cnt[$this->obj_id][Note::PUBLIC] > 0
2359  ) {
2360  $this->lng->loadLanguageModule('notes');
2361  $f = $this->ui->factory();
2362  $this->addHeaderGlyph(
2363  'comments',
2364  $f->symbol()->glyph()->comment('#')
2365  ->withCounter($f->counter()->status((int) $cnt[$this->obj_id][Note::PUBLIC])),
2366  ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $redraw_js)
2367  );
2368  }
2369  }
2370 
2371  // rating
2372  if ($this->rating_enabled) {
2373  $rating_gui = new ilRatingGUI();
2374  $rating_gui->enableCategories($this->rating_categories_enabled);
2375  // never rate sub objects from header action!
2376  $rating_gui->setObject($this->obj_id, $this->type);
2377  if ($this->rating_text) {
2378  $rating_gui->setYourRatingText($this->rating_text);
2379  }
2380 
2381  $ajax_hash = $this->force_rate_parent
2383  : $this->ajax_hash;
2384  $this->ctrl->setParameterByClass('ilRatingGUI', 'cadh', $ajax_hash);
2385  $this->ctrl->setParameterByClass('ilRatingGUI', 'rnsb', true);
2386  if ($this->rating_ctrl_path) {
2387  $rating_gui->setCtrlPath($this->rating_ctrl_path);
2388  $ajax_url = $this->ctrl->getLinkTargetByClass($this->rating_ctrl_path, 'saveRating', '', true);
2389  } else {
2390  $ajax_url = $this->ctrl->getLinkTargetByClass('ilRatingGUI', 'saveRating', '', true);
2391  }
2392  $main_tpl->addOnLoadCode('il.Object.setRatingUrl("' . $ajax_url . '");');
2393  $this->addHeaderIconHTML(
2394  'rating',
2395  $rating_gui->getHTML(
2396  true,
2397  $this->checkCommandAccess('read', '', $this->ref_id, $this->type),
2398  'il.Object.saveRating(%rating%);'
2399  )
2400  );
2401  }
2402 
2403  if ($this->header_icons) {
2404  $chunks = [];
2405  foreach ($this->header_icons as $id => $attr) {
2406  $id = 'headp_' . $id;
2407 
2408  if (is_array($attr)) {
2409  if (isset($attr['glyph']) && $attr['glyph']) {
2410  if ($attr['onclick']) {
2411  $htpl->setCurrentBlock('prop_glyph_oc');
2412  $htpl->setVariable('GLYPH_ONCLICK', $attr['onclick']);
2413  $htpl->parseCurrentBlock();
2414  }
2415  $renderer = $this->ui->renderer();
2416  $html = $renderer->render($attr['glyph']);
2417  $htpl->setCurrentBlock('prop_glyph');
2418  $htpl->setVariable('GLYPH', $html);
2419  $htpl->parseCurrentBlock();
2420  } else {
2421  if ($attr['onclick']) {
2422  $htpl->setCurrentBlock('onclick');
2423  $htpl->setVariable('PROP_ONCLICK', $attr['onclick']);
2424  $htpl->parseCurrentBlock();
2425  }
2426 
2427  if ($attr['status_text']) {
2428  $htpl->setCurrentBlock('status');
2429  $htpl->setVariable('PROP_TXT', $attr['status_text']);
2430  $htpl->parseCurrentBlock();
2431  }
2432 
2433 
2434  $htpl->setCurrentBlock('prop');
2435  if ($attr['href'] || $attr['onclick']) {
2436  $htpl->setVariable('TAG', 'a');
2437  } else {
2438  $htpl->setVariable('TAG', 'span');
2439  }
2440  $htpl->setVariable('PROP_ID', $id);
2441  $htpl->setVariable('IMG_SRC', $attr['img']);
2442  if ($attr['href'] != '') {
2443  $htpl->setVariable('PROP_HREF', ' href="' . $attr['href'] . '" ');
2444  }
2445 
2446  if ($attr['tooltip']) {
2447  $htpl->setVariable('IMG_ADDITIONAL', "alt=\"{$attr['tooltip']}\" title=\"{$attr['tooltip']}\"");
2448  }
2449  $htpl->parseCurrentBlock();
2450  }
2451  } else {
2452  $chunks[] = $attr;
2453  }
2454  }
2455 
2456  if (sizeof($chunks)) {
2457  $htpl->setVariable(
2458  'PROP_CHUNKS',
2459  implode('&nbsp;&nbsp;&nbsp;', $chunks) . '&nbsp;&nbsp;&nbsp;'
2460  );
2461  }
2462  }
2463 
2464  $this->setTitle(ilObject::_lookupTitle($this->obj_id));
2465  $dropdown_label = '<span class="hidden-xs">' .
2466  $this->lng->txt('actions') .
2467  '</span>';
2468  $dropdown = $this->getCommandsDropdown($dropdown_label, true);
2469  $htpl->setVariable(
2470  'ACTION_DROP_DOWN',
2471  $this->ui->renderer()->render($dropdown)
2472  );
2473 
2474  if ($this->cust_modals !== []) {
2475  $htpl->setVariable('TRIGGERED_MODALS', $this->ui->renderer()->render($this->cust_modals));
2476  }
2477 
2478  return $htpl->get();
2479  }
$renderer
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
getCommandsDropdown(string $title, bool $for_header=false)
ilGlobalTemplateInterface $main_tpl
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
static getListTagsJSCall(string $a_hash, ?string $a_update_code=null)
isCommentsActivated(string $type, int $ref_id, int $obj_id, bool $header_actions, bool $check_write_access=true)
Check comments status against comments settings and context.
static getTagsForUserAndObject(int $a_obj_id, string $a_obj_type, int $a_sub_obj_id, string $a_sub_obj_type, int $a_user_id)
static getListCommentsJSCall(string $a_hash, ?string $a_update_code=null)
Get list comments js call.
addHeaderGlyph(string $id, ILIAS\UI\Component\Symbol\Glyph\Glyph $glyph, $onclick=null)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static _lookupType(int $id, bool $reference=false)
addHeaderIconHTML(string $id, string $html)
static getListNotesJSCall(string $a_hash, ?string $a_update_code=null)
Get list notes js call.
+ Here is the call graph for this function:

◆ getIconImageType()

ilObjectListGUI::getIconImageType ( )

Returns the icon image type.

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

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

References $type.

Referenced by ilObjLTIConsumerListGUI\getIconHref(), ilObjOrgUnitListGUI\getTypeIcon(), and ilObjLTIConsumerListGUI\insertIconsAndCheckboxes().

1072  : string
1073  {
1074  return $this->type;
1075  }
+ Here is the caller graph for this function:

◆ getIconStatus()

ilObjectListGUI::getIconStatus ( )

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

References $icons_enabled.

Referenced by ilObjLTIConsumerListGUI\insertIconsAndCheckboxes().

349  : bool
350  {
351  return $this->icons_enabled;
352  }
+ Here is the caller graph for this function:

◆ getInfoScreenStatus()

ilObjectListGUI::getInfoScreenStatus ( )

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

References $info_screen_enabled.

Referenced by populateCommands().

472  : bool
473  {
475  }
+ Here is the caller graph for this function:

◆ getItemDetailLinkStatus()

ilObjectListGUI::getItemDetailLinkStatus ( )

get item detail link status

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

References $item_detail_links_enabled.

529  : bool
530  {
532  }

◆ getLinkStatus()

ilObjectListGUI::getLinkStatus ( )

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

References $link_enabled.

439  : bool
440  {
441  return $this->link_enabled;
442  }

◆ getListItemHTML()

ilObjectListGUI::getListItemHTML ( int  $ref_id,
int  $obj_id,
string  $title,
string  $description 
)

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

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

Referenced by ilObjStudyProgrammeReferenceListGUI\getListItemHTML().

2711  : string {
2712  // this variable stores whether any admin commands
2713  // are included in the output
2714  $this->adm_commands_included = false;
2715 
2716  // only for performance exploration
2718 
2720 
2721  if ($this->rating_enabled) {
2722  if (ilRating::hasRatingInListGUI($this->obj_id, $this->type)) {
2723  $may_rate = $this->checkCommandAccess('read', '', $this->ref_id, $this->type);
2724  $rating = new ilRatingGUI();
2725  $rating->setObject($this->obj_id, $this->type);
2726  $this->addCustomProperty(
2727  '',
2728  $rating->getListGUIProperty($this->ref_id, $may_rate, $this->ajax_hash, $this->parent_ref_id),
2729  false,
2730  true
2731  );
2732  }
2733  }
2734 
2735  // read from cache
2736  $this->acache = new ilListItemAccessCache();
2737  $cres = $this->acache->getEntry($this->user->getId() . ':' . $ref_id);
2738  if ($this->acache->getLastAccessStatus() == 'hit') {
2739  $this->access_cache = unserialize($cres);
2740  } else {
2741  // write to cache
2742  $this->storeAccessCache();
2743  }
2744 
2745  // visible check
2746  if (!$this->checkCommandAccess('visible', '', $ref_id, '', $obj_id)) {
2747  $this->resetCustomData();
2748  return '';
2749  }
2750 
2751  // BEGIN WEBDAV
2752  if ($type == 'file' and ilObjFileAccess::_isFileHidden($title)) {
2753  $this->resetCustomData();
2754  return '';
2755  }
2756  // END WEBDAV
2757 
2758  $this->tpl = new ilTemplate(
2759  static::$tpl_file_name,
2760  true,
2761  true,
2762  static::$tpl_component,
2763  'DEFAULT',
2764  false,
2765  true
2766  );
2767 
2768  if ($this->getCommandsStatus()) {
2769  if (!$this->getSeparateCommands()) {
2770  $dropdown = $this->getCommandsDropdown($title);
2771  $this->tpl->setVariable(
2772  'COMMAND_SELECTION_LIST',
2773  $this->ui->renderer()->render($dropdown)
2774  );
2775  }
2776  }
2777 
2778  if ($this->getProgressInfoStatus()) {
2779  $this->insertProgressInfo();
2780  }
2781 
2782  // insert title and describtion
2783  $this->insertTitle();
2784  if (!$this->isMode(self::IL_LIST_AS_TRIGGER)) {
2785  if ($this->getDescriptionStatus()) {
2786  $this->insertDescription();
2787  }
2788  }
2789 
2790  if ($this->getSearchFragmentStatus()) {
2791  $this->insertSearchFragment();
2792  }
2793 
2794  // properties
2795  if ($this->getPropertiesStatus()) {
2796  $this->insertProperties();
2797  }
2798 
2799  // notice properties
2800  if ($this->getNoticePropertiesStatus()) {
2801  $this->insertNoticeProperties();
2802  }
2803 
2804  // preconditions
2805  if ($this->getPreconditionsStatus()) {
2806  $this->insertPreconditions();
2807  }
2808 
2809  // path
2810  $this->insertPath();
2811 
2812  if ($this->getItemDetailLinkStatus()) {
2813  $this->insertItemDetailLinks();
2814  }
2815 
2816  // icons and checkboxes
2817  $this->insertIconsAndCheckboxes();
2818 
2819  // input field for position
2820  $this->insertPositionField();
2821 
2822  // subitems
2823  $this->insertSubItems();
2824 
2825  $this->resetCustomData();
2826 
2827  $this->tpl->setVariable('DIV_CLASS', 'ilContainerListItemOuter');
2828  $this->tpl->setVariable(
2829  'DIV_ID',
2830  'data-list-item-id="' . $this->getUniqueItemId(true) . '" id = "' . $this->getUniqueItemId(true) . '"'
2831  );
2832  $this->tpl->setVariable('ADDITIONAL', $this->getAdditionalInformation());
2833 
2834  if (is_object($this->getContainerObject())) {
2835  // #11554 - make sure that internal ids are reset
2836  $this->ctrl->setParameter($this->getContainerObject(), 'item_ref_id', '');
2837  }
2838 
2839  // if file upload is enabled the content is wrapped by a UI dropzone.
2840  $content = $this->tpl->get();
2841  $file_upload_dropzone = new ilObjFileUploadDropzone($this->ref_id, $content);
2842  if ($this->context === self::CONTEXT_REPOSITORY
2843  && ($this->requested_cmd === "view" || $this->requested_cmd === "" || $this->requested_cmd === "render")
2844  && $file_upload_dropzone->isUploadAllowed($this->type)
2845  && !(new ModeSessionRepository())->isAdminMode()
2846  ) {
2847  return $file_upload_dropzone->getDropzoneHtml();
2848  }
2849 
2850  return $content;
2851  }
insertSearchFragment()
Insert highlighted search fragment.
getUniqueItemId(bool $as_div=false)
Get unique item identifier (for js-actions)
initItem(int $ref_id, int $obj_id, string $type, string $title='', string $description='')
initialize new item (is called by getItemHTML())
insertPreconditions()
insert all missing preconditions
resetCustomData()
reset properties and commands
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getItemDetailLinkStatus()
get item detail link status
static _isFileHidden(string $a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user. ...
getCommandsDropdown(string $title, bool $for_header=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isMode(string $mode)
check current output mode
Caches (check) access information on list items.
static _lookupType(int $id, bool $reference=false)
addCustomProperty(string $property='', string $value='', bool $alert=false, bool $newline=false)
static hasRatingInListGUI(int $a_obj_id, string $a_obj_type)
+ Here is the caller graph for this function:

◆ getMode()

ilObjectListGUI::getMode ( )

get output mode

Returns
string output mode (self::IL_LIST_FULL | self::IL_LIST_AS_TRIGGER)

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

References $mode.

1208  : string
1209  {
1210  return $this->mode;
1211  }

◆ getNoticeProperties()

ilObjectListGUI::getNoticeProperties ( )

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

References $notice_prop.

Referenced by insertNoticeProperties().

941  : array
942  {
943  $this->notice_prop = [];
944  if ($infos = $this->ldap_mapping->getInfoStrings($this->obj_id, true)) {
945  foreach ($infos as $info) {
946  $this->notice_prop[] = ['value' => $info];
947  }
948  }
949  return $this->notice_prop;
950  }
+ Here is the caller graph for this function:

◆ getNoticePropertiesStatus()

ilObjectListGUI::getNoticePropertiesStatus ( )

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

References $notice_properties_enabled.

304  : bool
305  {
307  }

◆ getPathStatus()

ilObjectListGUI::getPathStatus ( )

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

References $path_enabled.

451  : bool
452  {
453  return $this->path_enabled;
454  }

◆ getPreconditionsStatus()

ilObjectListGUI::getPreconditionsStatus ( )

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

References $preconditions_enabled.

294  : bool
295  {
297  }

◆ getProgressInfoStatus()

ilObjectListGUI::getProgressInfoStatus ( )

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

References $progress_enabled.

502  : bool
503  {
505  }

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

References $webdav_dic, ilDAVActivationChecker\_isActive(), ANONYMOUS_USER_ID, ILIAS\Repository\lng(), ilObject\lookupOfflineStatus(), and ILIAS\Repository\user().

Referenced by determineProperties(), and getAlertProperties().

862  : array
863  {
864  $props = [];
865 
866  // #8280: WebDav is only supported in repository
867  if ($this->context == self::CONTEXT_REPOSITORY) {
868  // add centralized offline status
869  if (ilObject::lookupOfflineStatus($this->obj_id)) {
870  $props[] =
871  [
872  'alert' => true,
873  'property' => $this->lng->txt('status'),
874  'value' => $this->lng->txt('offline')
875  ];
876  }
877 
878  // BEGIN WebDAV Display locking information
880  // Show lock info
881  $webdav_dic = new ilWebDAVDIC();
882  $webdav_dic->initWithoutDIC();
883  $webdav_lock_backend = $webdav_dic->locksbackend();
884  if ($this->user->getId() !== ANONYMOUS_USER_ID) {
885  if ($lock = $webdav_lock_backend->getLocksOnObjectId($this->obj_id)) {
886  $lock_user = new ilObjUser($lock->getIliasOwner());
887 
888  $props[] = [
889  'alert' => false,
890  'property' => $this->lng->txt('in_use_by'),
891  'value' => $lock_user->getLogin(),
892  'link' =>
893  './ilias.php?user=' .
894  $lock_user->getId() .
895  '&cmd=showUserProfile&cmdClass=ildashboardgui&baseClass=ilDashboardGUI'
896  ];
897  }
898  }
899  }
900  // END WebDAV Display warning for invisible files and files with special characters
901  }
902 
903  return $props;
904  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
static lookupOfflineStatus(int $obj_id)
Lookup offline status using objectDataCache.
catch(InvalidArgumentException) if(!ilDAVActivationChecker::_isActive()) $webdav_dic
Definition: webdav.php:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPropertiesStatus()

ilObjectListGUI::getPropertiesStatus ( )

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

References $properties_enabled.

284  : bool
285  {
287  }

◆ getRelevance()

ilObjectListGUI::getRelevance ( )

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

References $relevance.

339  : int
340  {
341  return $this->relevance;
342  }

◆ getSearchFragment()

ilObjectListGUI::getSearchFragment ( )

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

References $search_fragment.

Referenced by insertSearchFragment().

605  : string
606  {
607  return $this->search_fragment;
608  }
+ Here is the caller graph for this function:

◆ getSearchFragmentStatus()

ilObjectListGUI::getSearchFragmentStatus ( )

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

References $search_fragment_enabled.

324  : bool
325  {
327  }

◆ getSeparateCommands()

ilObjectListGUI::getSeparateCommands ( )

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

References $separate_commands.

615  : bool
616  {
618  }

◆ getSubscribeStatus()

ilObjectListGUI::getSubscribeStatus ( )

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

References $subscribe_enabled.

429  : bool
430  {
432  }

◆ getSubstitutionStatus()

ilObjectListGUI::getSubstitutionStatus ( )

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

References $substitutions_enabled.

Referenced by insertDescription().

512  : bool
513  {
515  }
+ Here is the caller graph for this function:

◆ getTileImage()

ilObjectListGUI::getTileImage ( )
private

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

3280  : Image
3281  {
3282  return $this->object_properties->getPropertyTileImage()
3283  ->getTileImage()->getImage($this->ui->factory()->image());
3284  }

◆ getTitle()

ilObjectListGUI::getTitle ( )

getTitle overwritten in class.ilObjLinkResourceList.php

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

References $title.

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

577  : string
578  {
579  return $this->title;
580  }
+ Here is the caller graph for this function:

◆ getTypeIcon()

ilObjectListGUI::getTypeIcon ( )

Get object type specific type icon.

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

2654  : string
2655  {
2656  return ilObject::getIconForReference(
2657  $this->ref_id,
2658  $this->obj_id,
2659  'small',
2660  $this->getIconImageType()
2661  );
2662  }
getIconImageType()
Returns the icon image type.

◆ getUniqueItemId()

ilObjectListGUI::getUniqueItemId ( bool  $as_div = false)

Get unique item identifier (for js-actions)

Parameters
bool$a_as_div
Returns
string

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

2880  : string
2881  {
2882  // use correct id for references
2883  $id_ref = $this->ref_id;
2884  if ($this->reference_ref_id > 0) {
2885  $id_ref = $this->reference_ref_id;
2886  }
2887 
2888  // add unique identifier for preconditions (objects can appear twice in same container)
2889  if ($this->condition_depth) {
2890  $id_ref .= '_pc' . $this->condition_depth;
2891  }
2892 
2893  // unique
2894  $id_ref .= '_pref_' . $this->parent_ref_id;
2895 
2896  if (!$as_div) {
2897  return $id_ref;
2898  } else {
2899  // action menu [yellow] toggle
2900  return 'lg_div_' . $id_ref;
2901  }
2902  }

◆ init()

ilObjectListGUI::init ( )

initialisation

this method should be overwritten by derived classes

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

References ilObjectAccess\_getCommands().

260  : void
261  {
262  // Create static links for default command (linked title) or not
263  $this->static_link_enabled = true;
264  $this->delete_enabled = true;
265  $this->cut_enabled = true;
266  $this->subscribe_enabled = true;
267  $this->link_enabled = false;
268  $this->copy_enabled = false;
269  $this->progress_enabled = false;
270  $this->notice_properties_enabled = true;
271  $this->info_screen_enabled = false;
272  $this->type = ''; // 'cat', 'course', ...
273  $this->gui_class_name = ''; // 'ilobjcategorygui', 'ilobjcoursegui', ...
274 
275  // general commands array, e.g.
276  $this->commands = ilObjectAccess::_getCommands();
277  }
static _getCommands()
get commands
+ Here is the call graph for this function:

◆ initItem()

ilObjectListGUI::initItem ( int  $ref_id,
int  $obj_id,
string  $type,
string  $title = '',
string  $description = '' 
)

initialize new item (is called by getItemHTML())

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

References $obj_id, $ref_id, ilCommonActionDispatcherGUI\buildAjaxHash(), setAjaxHash(), setDescription(), setTitle(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ilCommonActionDispatcherGUI\TYPE_WORKSPACE.

722  : void {
723  $this->access_cache = [];
724  $this->ref_id = $ref_id;
725  $this->obj_id = $obj_id;
726  $this->object_properties = $this->object_dic['object_properties_agregator']->getFor($obj_id);
727  $this->setTitle($title);
729 
730  // checks, whether any admin commands are included in the output
731  $this->adm_commands_included = false;
732  $this->prevent_access_caching = false;
733 
734  // prepare ajax calls
735  if ($this->context == self::CONTEXT_REPOSITORY) {
737  } else {
739  }
741  }
setDescription(string $description)
static buildAjaxHash(int $node_type, ?int $node_id, string $obj_type, int $obj_id, ?string $sub_type=null, ?int $sub_id=null, int $news_id=0)
Build ajax hash.
+ Here is the call graph for this function:

◆ insertCommand()

ilObjectListGUI::insertCommand ( string  $href,
string  $text,
string  $frame = '',
string  $img = '',
string  $cmd = '',
string  $onclick = '' 
)

insert command button

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

References $id, ilWebDAVMountInstructionsModalGUI\maybeRenderWebDAVModalInGlobalTpl(), and ILIAS\Repository\ui().

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

1583  : void {
1584  // #11099
1585  $checksum = md5($href . $text);
1586  if ($href !== '#' && in_array($checksum, $this->prevent_duplicate_commands)) {
1587  return;
1588  }
1589 
1590  if ($href !== '#') {
1591  $this->prevent_duplicate_commands[] = $checksum;
1592  }
1593 
1594  if ($cmd === 'mount_webfolder') {
1595  $onclick = "triggerWebDAVModal('$href')";
1596  $href = '#';
1598  }
1599 
1600  $action = $this->ui->factory()
1601  ->button()
1602  ->shy($text, $href);
1603 
1604  if ($frame !== '') {
1605  $action = $this->ui->factory()->link()->standard($text, $href)->withOpenInNewViewport(true);
1606  }
1607 
1608  if ($onclick !== '') {
1609  $action = $action->withAdditionalOnLoadCode(function ($id) use ($onclick): string {
1610  return "$('#$id').click(function(){" . $onclick . ';});';
1611  });
1612  }
1613 
1614 
1615 
1616  $this->current_actions[] = $action;
1617  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertCommonSocialCommands()

ilObjectListGUI::insertCommonSocialCommands ( bool  $header_actions = false)

Insert common social commands (comments, notes, tagging)

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

References $ref_id, $reference_ref_id, getCommandFrame(), ilNoteGUI\getListCommentsJSCall(), ilNoteGUI\getListNotesJSCall(), ilTaggingGUI\getListTagsJSCall(), insertCommand(), isCommentsActivated(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

Referenced by populateCommands().

1842  : void
1843  {
1844  if ($this->std_cmd_only || $this->user->isAnonymous()) {
1845  return;
1846  }
1847 
1848  $this->lng->loadLanguageModule('notes');
1849  $this->lng->loadLanguageModule('tagging');
1850  $cmd_frame = $this->getCommandFrame('infoScreen');
1851 
1852  // reference objects have translated ids, revert to originals
1853  $note_ref_id = $this->ref_id;
1854  if ($this->reference_ref_id) {
1855  $note_ref_id = $this->reference_ref_id;
1856  }
1857 
1858  $js_updater = $header_actions
1859  ? 'il.Object.redrawActionHeader();'
1860  : 'il.Object.redrawListItem(' . $note_ref_id . ')';
1861 
1862  $comments_enabled = $this->isCommentsActivated($this->type, $this->ref_id, $this->obj_id, $header_actions);
1863  if ($comments_enabled) {
1864  $this->insertCommand(
1865  '#',
1866  $this->lng->txt('notes_comments'),
1867  $cmd_frame,
1868  '',
1869  '',
1870  ilNoteGUI::getListCommentsJSCall($this->ajax_hash, $js_updater)
1871  );
1872  }
1873 
1874  if ($this->notes_enabled) {
1875  $this->insertCommand(
1876  '#',
1877  $this->lng->txt('notes'),
1878  $cmd_frame,
1879  '',
1880  '',
1881  ilNoteGUI::getListNotesJSCall($this->ajax_hash, $js_updater)
1882  );
1883  }
1884 
1885  if ($this->tags_enabled) {
1886  $this->insertCommand(
1887  '#',
1888  $this->lng->txt('tagging_set_tag'),
1889  $cmd_frame,
1890  '',
1891  '',
1892  ilTaggingGUI::getListTagsJSCall($this->ajax_hash, $js_updater)
1893  );
1894  }
1895  }
getCommandFrame(string $cmd)
Get command target frame.
static getListTagsJSCall(string $a_hash, ?string $a_update_code=null)
isCommentsActivated(string $type, int $ref_id, int $obj_id, bool $header_actions, bool $check_write_access=true)
Check comments status against comments settings and context.
static getListCommentsJSCall(string $a_hash, ?string $a_update_code=null)
Get list comments js call.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
static getListNotesJSCall(string $a_hash, ?string $a_update_code=null)
Get list notes js call.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertCopyCommand()

ilObjectListGUI::insertCopyCommand ( bool  $to_repository = false)

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

References checkCommandAccess(), ILIAS\Repository\ctrl(), getCommandId(), insertCommand(), and ILIAS\Repository\lng().

Referenced by populateCommands().

1729  : void
1730  {
1731  if ($this->std_cmd_only) {
1732  return;
1733  }
1734 
1735  if ($this->checkCommandAccess('copy', 'copy', $this->ref_id, $this->type) &&
1736  $this->obj_definition->allowCopy($this->type)) {
1737  if ($this->context != self::CONTEXT_WORKSPACE && $this->context != self::CONTEXT_WORKSPACE_SHARING) {
1738  $this->ctrl->setParameterByClass('ilobjectcopygui', 'source_id', $this->getCommandId());
1739  $cmd_copy = $this->ctrl->getLinkTargetByClass([get_class($this->container_obj), 'ilobjectcopygui'], 'initTargetSelection');
1740  $this->insertCommand($cmd_copy, $this->lng->txt('copy'));
1741  } else {
1742  $this->ctrl->setParameter(
1743  $this->container_obj,
1744  'ref_id',
1745  $this->container_obj->getObject()->getRefId()
1746  );
1747  $this->ctrl->setParameter($this->container_obj, 'item_ref_id', $this->getCommandId());
1748 
1749  if (!$to_repository) {
1750  $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj, 'copy');
1751  $this->insertCommand($cmd_copy, $this->lng->txt('copy'));
1752  } else {
1753  $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj, 'copy_to_repository');
1754  $this->insertCommand($cmd_copy, $this->lng->txt('wsp_copy_to_repository'));
1755  }
1756  }
1757 
1758  $this->adm_commands_included = true;
1759  }
1760  }
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getCommandId()
get command id Normally the ref id.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertCutCommand()

ilObjectListGUI::insertCutCommand ( bool  $to_repository = false)

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

References checkCommandAccess(), ILIAS\Repository\ctrl(), getCommandId(), getContainerObject(), insertCommand(), and ILIAS\Repository\lng().

Referenced by populateCommands().

1688  : void
1689  {
1690  if ($this->std_cmd_only) {
1691  return;
1692  }
1693  // BEGIN PATCH Lucene search
1694  if (
1696  ) {
1697  if ($this->checkCommandAccess('delete', '', $this->ref_id, $this->type)) {
1698  $this->ctrl->setParameter($this->getContainerObject(), 'item_ref_id', $this->getCommandId());
1699  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), 'cut');
1700  $this->insertCommand($cmd_link, $this->lng->txt('move'));
1701  $this->adm_commands_included = true;
1702  }
1703  return;
1704  }
1705  // END PATCH Lucene Search
1706 
1707  // if the permission is changed here, it has
1708  // also to be changed in ilContainerContentGUI, determineAdminCommands
1709  if ($this->checkCommandAccess('delete', '', $this->ref_id, $this->type) && $this->container_obj->getObject()) {
1710  $this->ctrl->setParameter(
1711  $this->container_obj,
1712  'ref_id',
1713  $this->container_obj->getObject()->getRefId()
1714  );
1715  $this->ctrl->setParameter($this->container_obj, 'item_ref_id', $this->getCommandId());
1716 
1717  if (!$to_repository) {
1718  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'cut');
1719  $this->insertCommand($cmd_link, $this->lng->txt('move'));
1720  } else {
1721  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'cut_for_repository');
1722  $this->insertCommand($cmd_link, $this->lng->txt('wsp_move_to_repository'));
1723  }
1724 
1725  $this->adm_commands_included = true;
1726  }
1727  }
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getCommandId()
get command id Normally the ref id.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
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 ( )

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

References checkCommandAccess(), ILIAS\Repository\ctrl(), getCommandId(), getContainerObject(), insertCommand(), and ILIAS\Repository\lng().

Referenced by populateCommands().

1619  : void
1620  {
1621  if ($this->std_cmd_only) {
1622  return;
1623  }
1624 
1625  if (is_object($this->getContainerObject()) and
1627  if ($this->checkCommandAccess('delete', '', $this->ref_id, $this->type)) {
1628  $this->ctrl->setParameter($this->getContainerObject(), 'item_ref_id', $this->getCommandId());
1629  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), 'delete');
1630  $this->insertCommand($cmd_link, $this->lng->txt('delete'));
1631  $this->adm_commands_included = true;
1632  }
1633  return;
1634  }
1635 
1636  if ($this->checkCommandAccess('delete', '', $this->ref_id, $this->type)) {
1637  $this->ctrl->setParameter(
1638  $this->container_obj,
1639  'ref_id',
1640  $this->container_obj->getObject()->getRefId()
1641  );
1642  $this->ctrl->setParameter($this->container_obj, 'item_ref_id', $this->getCommandId());
1643  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'delete');
1644  $this->insertCommand($cmd_link, $this->lng->txt('delete'));
1645  $this->adm_commands_included = true;
1646  }
1647  }
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getCommandId()
get command id Normally the ref id.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
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 ( )

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

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

Referenced by ilCourseObjectiveListGUI\getObjectiveListItemHTML().

1167  : void
1168  {
1169  if ($this->getSubstitutionStatus()) {
1170  $this->insertSubstitutions();
1171  if (!$this->substitutions->isDescriptionEnabled()) {
1172  return;
1173  }
1174  }
1175 
1176  $this->tpl->setCurrentBlock('item_description');
1177  $this->tpl->setVariable('TXT_DESC', $this->getDescription());
1178  $this->tpl->parseCurrentBlock();
1179  }
getDescription()
getDescription overwritten in class.ilObjLinkResourceList.php
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertIconsAndCheckboxes()

ilObjectListGUI::insertIconsAndCheckboxes ( )

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

Referenced by ilCourseObjectiveListGUI\getObjectiveListItemHTML().

2590  : void
2591  {
2592  $cnt = 0;
2593  if ($this->getCheckboxStatus()) {
2594  $this->tpl->setCurrentBlock('check');
2595  $this->tpl->setVariable('VAL_ID', $this->getCommandId());
2596  $this->tpl->setVariable('CHECK_TITLE', $this->lng->txt('select') . ' ' . $this->getTitle());
2597  $this->tpl->parseCurrentBlock();
2598  $cnt += 1;
2599  } elseif ($this->getDownloadCheckboxState() != self::DOWNLOAD_CHECKBOX_NONE) {
2600  $this->tpl->setCurrentBlock('check_download');
2601  $this->tpl->setVariable('CHECK_DOWNLOAD_TITLE', $this->lng->txt('download') . ' ' . $this->getTitle());
2602  if ($this->getDownloadCheckboxState() == self::DOWNLOAD_CHECKBOX_ENABLED) {
2603  $this->tpl->setVariable('VAL_ID', $this->getCommandId());
2604  } else {
2605  $this->tpl->setVariable('VAL_VISIBILITY', 'visibility: hidden;" disabled="disabled');
2606  }
2607  $this->tpl->parseCurrentBlock();
2608  $cnt += 1;
2609  } elseif ($this->getExpandStatus()) {
2610  $this->tpl->setCurrentBlock('expand');
2611 
2612  if ($this->isExpanded()) {
2613  $this->ctrl->setParameter($this->container_obj, 'expand', -1 * $this->obj_id);
2614  // 'view' added, see #19922
2615  $this->tpl->setVariable('EXP_HREF', $this->ctrl->getLinkTarget($this->container_obj, 'view', $this->getUniqueItemId(true)));
2616  $this->ctrl->clearParameters($this->container_obj);
2617  $this->tpl->setVariable('EXP_IMG', ilUtil::getImagePath('nav/tree_exp.svg'));
2618  $this->tpl->setVariable('EXP_ALT', $this->lng->txt('collapse'));
2619  } else {
2620  $this->ctrl->setParameter($this->container_obj, 'expand', $this->obj_id);
2621  // 'view' added, see #19922
2622  $this->tpl->setVariable('EXP_HREF', $this->ctrl->getLinkTarget($this->container_obj, 'view', $this->getUniqueItemId(true)));
2623  $this->ctrl->clearParameters($this->container_obj);
2624  $this->tpl->setVariable('EXP_IMG', ilUtil::getImagePath('nav/tree_col.svg'));
2625  $this->tpl->setVariable('EXP_ALT', $this->lng->txt('expand'));
2626  }
2627 
2628  $this->tpl->parseCurrentBlock();
2629  $cnt += 1;
2630  }
2631 
2632  if ($this->getIconStatus()) {
2633  if ($cnt == 1) {
2634  $this->tpl->touchBlock('i_1');
2635  }
2636 
2637  $this->tpl->setCurrentBlock('icon');
2638  $this->tpl->setVariable('ALT_ICON', $this->buildTranslatedType());
2639 
2640  $this->tpl->setVariable(
2641  'SRC_ICON',
2642  $this->getTypeIcon()
2643  );
2644  $this->tpl->parseCurrentBlock();
2645  $cnt += 1;
2646  }
2647 
2648  $this->tpl->touchBlock('d_' . $cnt);
2649  }
getTypeIcon()
Get object type specific type icon.
getCommandId()
get command id Normally the ref id.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getTitle()
getTitle overwritten in class.ilObjLinkResourceList.php
+ Here is the caller graph for this function:

◆ insertInfoScreenCommand()

ilObjectListGUI::insertInfoScreenCommand ( )

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

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

Referenced by populateCommands().

1826  : void
1827  {
1828  if ($this->std_cmd_only) {
1829  return;
1830  }
1831  $this->insertCommand(
1832  $this->getCommandLink('infoScreen'),
1833  $this->lng->txt('info_short'),
1834  $this->getCommandFrame('infoScreen'),
1835  ilUtil::getImagePath('standard/icon_info.svg')
1836  );
1837  }
getCommandFrame(string $cmd)
Get command target frame.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getCommandLink(string $cmd)
Get command link url.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertItemDetailLinks()

ilObjectListGUI::insertItemDetailLinks ( )

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

545  : void
546  {
547  if (!count($this->item_detail_links)) {
548  return;
549  }
550  if (strlen($this->item_detail_links_intro)) {
551  $this->tpl->setCurrentBlock('item_detail_intro');
552  $this->tpl->setVariable('ITEM_DETAIL_INTRO_TXT', $this->item_detail_links_intro);
553  $this->tpl->parseCurrentBlock();
554  }
555 
556  foreach ($this->item_detail_links as $info) {
557  $this->tpl->setCurrentBlock('item_detail_link');
558  $this->tpl->setVariable('ITEM_DETAIL_LINK_TARGET', $info['target']);
559  $this->tpl->setVariable('ITEM_DETAIL_LINK_DESC', $info['desc']);
560  $this->tpl->setVariable('ITEM_DETAIL_LINK_HREF', $info['link']);
561  $this->tpl->setVariable('ITEM_DETAIL_LINK_NAME', $info['name']);
562  $this->tpl->parseCurrentBlock();
563  }
564  $this->tpl->setCurrentBlock('item_detail_links');
565  $this->tpl->parseCurrentBlock();
566  }

◆ insertLinkCommand()

ilObjectListGUI::insertLinkCommand ( )

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

References $obj_definition, checkCommandAccess(), ILIAS\Repository\ctrl(), getCommandId(), getContainerObject(), insertCommand(), and ILIAS\Repository\lng().

Referenced by populateCommands().

1649  : void
1650  {
1651  $objDefinition = $this->obj_definition;
1652 
1653  if ($this->std_cmd_only) {
1654  return;
1655  }
1656 
1657  // #17307
1658  if (
1659  !$this->checkCommandAccess('delete', '', $this->ref_id, $this->type) ||
1660  !$objDefinition->allowLink($this->type)
1661  ) {
1662  return;
1663  }
1664 
1665  // BEGIN PATCH Lucene search
1666  if ($this->getContainerObject() instanceof ilAdministrationCommandHandling) {
1667  $this->ctrl->setParameter($this->getContainerObject(), 'item_ref_id', $this->getCommandId());
1668  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), 'link');
1669  $this->insertCommand($cmd_link, $this->lng->txt('link'));
1670  $this->adm_commands_included = true;
1671  return;
1672  }
1673  // END PATCH Lucene Search
1674 
1675  // if the permission is changed here, it has
1676  // also to be changed in ilContainerGUI, admin command check
1677  $this->ctrl->setParameter(
1678  $this->container_obj,
1679  'ref_id',
1680  $this->container_obj->getObject()->getRefId()
1681  );
1682  $this->ctrl->setParameter($this->container_obj, 'item_ref_id', $this->getCommandId());
1683  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'link');
1684  $this->insertCommand($cmd_link, $this->lng->txt('link'));
1685  $this->adm_commands_included = true;
1686  }
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getCommandId()
get command id Normally the ref id.
ilObjectDefinition $obj_definition
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
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:

◆ insertLPCommand()

ilObjectListGUI::insertLPCommand ( )

insert learning progress command

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

Referenced by populateCommands().

3289  : void
3290  {
3291  if ($this->std_cmd_only || !$this->lp_cmd_enabled) {
3292  return;
3293  }
3294  $relevant = ilLPStatus::hasListGUIStatus($this->obj_id);
3295  if ($relevant) {
3296  $cmd_link = $this->getCommandLink('learningProgress');
3297  $this->insertCommand(
3298  $cmd_link,
3299  $this->lng->txt('learning_progress')
3300  );
3301  }
3302  }
static hasListGUIStatus(int $a_obj_id)
getCommandLink(string $cmd)
Get command link url.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
+ Here is the caller graph for this function:

◆ insertLPSettingsCommand()

ilObjectListGUI::insertLPSettingsCommand ( )
private
Deprecated:
in 9.0 (we need a better way to do this!)

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

Referenced by populateCommands().

3307  : void
3308  {
3309  if (!$this->lp_settings_cmd_enabled
3311  || ilObjectLP::getTypeClass($this->type) === ''
3312  || ! $this->checkCommandAccess('edit_learning_progress', '', $this->ref_id, $this->type)
3313  ) {
3314  return;
3315  }
3316 
3317  $cmd_link = '';
3318  $this->ctrl->setParameterByClass(ilLearningProgressGUI::class, 'ref_id', $this->ref_id);
3319  switch ($this->type) {
3320  case 'sahs':
3321  switch (ilObjSAHSLearningModule::_lookupSubType($this->obj_id)) {
3322  case 'scorm2004':
3323  $scorm_class = ilObjSCORM2004LearningModuleGUI::class;
3324  break;
3325  case 'scorm':
3326  $scorm_class = ilObjSCORMLearningModuleGUI::class;
3327  break;
3328  default:
3329  $scorm_class = '';
3330  break;
3331  }
3332 
3333  $cmd_link = $this->ctrl->getLinkTargetByClass([
3334  ilSAHSEditGUI::class,
3335  $scorm_class,
3336  ilLearningProgressGUI::class,
3337  ilLPListOfSettingsGUI::class
3338  ]);
3339  break;
3340 
3341  case 'lm':
3342  $cmd_link = $this->ctrl->getLinkTargetByClass([
3343  ilLMEditorGUI::class,
3344  ilObjLearningModuleGUI::class,
3345  ilLearningProgressGUI::class,
3346  ilLPListOfSettingsGUI::class
3347  ]);
3348  break;
3349 
3350  case 'lso':
3351  $cmd_link = $this->ctrl->getLinkTargetByClass([
3352  ilObjLearningSequenceGUI::class,
3353  ilLearningProgressGUI::class,
3354  ilLPListOfSettingsGUI::class
3355  ]);
3356  break;
3357 
3358  case 'copa':
3359  case 'iass':
3360  case 'tst':
3361  case 'htlm':
3362  case 'exc':
3363  case 'svy':
3364  case 'file':
3365  case 'crs':
3366  $gui_class = 'ilObj' . $this->obj_definition->getClassName($this->type) . 'GUI';
3367  $cmd_link = $this->ctrl->getLinkTargetByClass([
3368  ilRepositoryGUI::class,
3369  $gui_class,
3370  ilLearningProgressGUI::class,
3371  ilLPListOfSettingsGUI::class
3372  ]);
3373  break;
3374 
3375  case 'prgr':
3376  case 'prg':
3377  case 'lso':
3378  break;
3379  default:
3380  break;
3381  }
3382 
3383  $this->ctrl->setParameterByClass('ilrepositorygui', 'ref_id', $this->requested_ref_id);
3384  if ($cmd_link !== '') {
3385  $this->insertCommand(
3386  $cmd_link,
3387  $this->lng->txt('listaction_learning_progress_settings')
3388  );
3389  }
3390  }
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, )
static getTypeClass(string $type)
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
+ Here is the caller graph for this function:

◆ insertMultiDownloadCommand()

ilObjectListGUI::insertMultiDownloadCommand ( )

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

References $requested_ref_id, $user_id, ilObject\_lookupType(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), getContainerObject(), insertCommand(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

Referenced by populateCommands().

2177  : void
2178  {
2179  if ($this->std_cmd_only) {
2180  return;
2181  }
2182 
2183  if (!$this->obj_definition->isContainer(ilObject::_lookupType($this->obj_id))) {
2184  return;
2185  }
2186 
2187  if ($this->getContainerObject() instanceof ilContainerGUI) {
2188  $this->ctrl->setParameter($this->getContainerObject(), 'type', '');
2189  $this->ctrl->setParameter($this->getContainerObject(), 'item_ref_id', '');
2190  $this->ctrl->setParameter($this->getContainerObject(), 'active_node', '');
2191  // bugfix mantis 24559
2192  // undoing an erroneous change inside mantis 23516 by
2193  // adding 'Download Multiple Objects'-functionality for non-admins
2194  // as they don't have the possibility to use the multi-download-capability of the manage-tab
2195  $user_id = $this->user->getId();
2196  $hasAdminAccess = $this->access->checkAccessOfUser($user_id, 'crs_admin', $this->ctrl->getCmd(), $this->requested_ref_id);
2197  // to still prevent duplicate download functions for admins
2198  // the following if-else statement keeps the redirection for admins
2199  // while letting other course members access the original multi-download functionality
2200  if ($hasAdminAccess) {
2201  $cmd = ($this->requested_cmd == 'enableAdministrationPanel')
2202  ? 'render'
2203  : 'enableAdministrationPanel';
2204  } else {
2205  $cmd = ($this->requested_cmd == 'enableMultiDownload')
2206  ? 'render'
2207  : 'enableMultiDownload';
2208  }
2209  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), $cmd);
2210  $this->insertCommand($cmd_link, $this->lng->txt('download_multiple_objects'));
2211  }
2212  }
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder...
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertNoticeProperties()

ilObjectListGUI::insertNoticeProperties ( )

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

References getNoticeProperties().

1410  : void
1411  {
1412  $this->getNoticeProperties();
1413  foreach ($this->notice_prop as $property) {
1414  $this->tpl->setCurrentBlock('notice_item');
1415  $this->tpl->setVariable('NOTICE_ITEM_VALUE', $property['value']);
1416  $this->tpl->parseCurrentBlock();
1417  }
1418  $this->tpl->setCurrentBlock('notice_property');
1419  $this->tpl->parseCurrentBlock();
1420  }
+ Here is the call graph for this function:

◆ insertPasteCommand()

ilObjectListGUI::insertPasteCommand ( )

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

References ilObject\_lookupType(), ILIAS\Repository\ctrl(), getCommandId(), getContainerObject(), insertCommand(), and ILIAS\Repository\lng().

Referenced by populateCommands().

1762  : void
1763  {
1764  if ($this->std_cmd_only) {
1765  return;
1766  }
1767 
1768  if (!$this->obj_definition->isContainer(ilObject::_lookupType($this->obj_id))) {
1769  return;
1770  }
1771 
1772  if (
1774  $this->clipboard->hasEntries()
1775  ) {
1776  $this->ctrl->setParameter($this->getContainerObject(), 'item_ref_id', $this->getCommandId());
1777  $cmd_link = $this->ctrl->getLinkTarget($this->getContainerObject(), 'paste');
1778  $this->insertCommand($cmd_link, $this->lng->txt('paste'));
1779  $this->adm_commands_included = true;
1780  }
1781  }
getCommandId()
get command id Normally the ref id.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPath()

ilObjectListGUI::insertPath ( )

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

2559  : void
2560  {
2561  if ($this->getPathStatus() != false) {
2562  if (!$this->path_gui instanceof \ilPathGUI) {
2563  $path_gui = new \ilPathGUI();
2564  } else {
2566  }
2567 
2568  $path_gui->enableTextOnly(!$this->path_linked);
2569  $path_gui->setUseImages(false);
2570 
2571  $start_node = ROOT_FOLDER_ID;
2572  if ($this->path_start_node) {
2573  $start_node = $this->path_start_node;
2574  }
2575 
2576  $this->tpl->setCurrentBlock('path_item');
2577  $this->tpl->setVariable('PATH_ITEM', $path_gui->getPath($start_node, $this->ref_id));
2578  $this->tpl->parseCurrentBlock();
2579 
2580  $this->tpl->setCurrentBlock('path');
2581  $this->tpl->setVariable('TXT_LOCATION', $this->lng->txt('locator'));
2582  $this->tpl->parseCurrentBlock();
2583  }
2584  }
enableTextOnly(bool $a_status)
render path as text only
const ROOT_FOLDER_ID
Definition: constants.php:32
setUseImages(bool $a_status)
getPath(int $a_startnode, int $a_endnode)
get path

◆ insertPositionField()

ilObjectListGUI::insertPositionField ( )

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

Referenced by ilCourseObjectiveListGUI\getObjectiveListItemHTML().

2673  : void
2674  {
2675  if ($this->position_enabled) {
2676  $this->tpl->setCurrentBlock('position');
2677  $this->tpl->setVariable('POS_ID', $this->position_field_index);
2678  $this->tpl->setVariable('POS_VAL', $this->position_value);
2679  $this->tpl->parseCurrentBlock();
2680  }
2681  }
+ Here is the caller graph for this function:

◆ insertPreconditions()

ilObjectListGUI::insertPreconditions ( )

insert all missing preconditions

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

References ilObject\_lookupTitle(), ILIAS\Repository\lng(), parseConditions(), and ilArrayUtil\sortArray().

1528  : void
1529  {
1530  // do not show multi level conditions (messes up layout)
1531  if ($this->condition_depth > 0) {
1532  return;
1533  }
1534 
1535  if ($this->context == self::CONTEXT_WORKSPACE) {
1536  return;
1537  }
1538 
1539  if (isset($this->condition_target) && is_array($this->condition_target)
1540  && count($this->condition_target) > 0) {
1541  $conditions = ilConditionHandler::_getEffectiveConditionsOfTarget(
1542  (int) $this->condition_target['ref_id'],
1543  (int) $this->condition_target['obj_id'],
1544  $this->condition_target['target_type'] ?? ''
1545  );
1546  } else {
1547  $conditions = ilConditionHandler::_getEffectiveConditionsOfTarget($this->ref_id, $this->obj_id);
1548  }
1549 
1550  if (sizeof($conditions)) {
1551  for ($i = 0; $i < count($conditions); $i++) {
1552  $conditions[$i]['title'] = ilObject::_lookupTitle($conditions[$i]['trigger_obj_id']);
1553  }
1554  $conditions = ilArrayUtil::sortArray($conditions, 'title', 'DESC');
1555 
1556  ++self::$js_unique_id;
1557  // Show obligatory and optional preconditions seperated
1558  $all_done_obl = $this->parseConditions(self::$js_unique_id, $conditions);
1559  $all_done_opt = $this->parseConditions(self::$js_unique_id, $conditions, false);
1560 
1561  if (!$all_done_obl || !$all_done_opt) {
1562  $this->tpl->setCurrentBlock('preconditions_toggle');
1563  $this->tpl->setVariable('PRECONDITION_TOGGLE_INTRO', $this->lng->txt('precondition_toggle'));
1564  $this->tpl->setVariable('PRECONDITION_TOGGLE_TRIGGER', $this->lng->txt('show'));
1565  $this->tpl->setVariable('PRECONDITION_TOGGLE_ID', self::$js_unique_id);
1566  $this->tpl->setVariable('TXT_PRECONDITION_SHOW', $this->lng->txt('show'));
1567  $this->tpl->setVariable('TXT_PRECONDITION_HIDE', $this->lng->txt('hide'));
1568  $this->tpl->parseCurrentBlock();
1569  }
1570  }
1571  }
parseConditions(int $toggle_id, array $conditions, bool $obligatory=true)
static _lookupTitle(int $obj_id)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
+ Here is the call graph for this function:

◆ insertProgressInfo()

ilObjectListGUI::insertProgressInfo ( )

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

2586  : void
2587  {
2588  }

◆ insertProperties()

ilObjectListGUI::insertProperties ( )

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

References determineProperties(), and null.

1360  : void
1361  {
1362  $props = $this->determineProperties();
1363  $cnt = 1;
1364  if (is_array($props) && count($props) > 0) {
1365  foreach ($props as $prop) {
1366  if ($cnt > 1) {
1367  $this->tpl->touchBlock('separator_prop');
1368  }
1369 
1370  if (isset($prop['alert']) && $prop['alert'] == true) {
1371  $this->tpl->touchBlock('alert_prop');
1372  } else {
1373  $this->tpl->touchBlock('std_prop');
1374  }
1375 
1376  if (isset($prop['newline']) && $prop['newline'] == true && $cnt > 1) {
1377  $this->tpl->touchBlock('newline_prop');
1378  }
1379 
1380  //BEGIN WebDAV: Support hidden property names.
1381  if (
1382  isset($prop['property']) &&
1383  (($prop['propertyNameVisible'] ?? null) !== false) &&
1384  $prop['property'] != ''
1385  ) {
1386  //END WebDAV: Support hidden property names.
1387  $this->tpl->setCurrentBlock('prop_name');
1388  $this->tpl->setVariable('TXT_PROP', $prop['property']);
1389  $this->tpl->parseCurrentBlock();
1390  }
1391 
1392  $this->tpl->setCurrentBlock('item_property');
1393  //BEGIN WebDAV: Support links in property values.
1394  if (isset($prop['link']) && $prop['link']) {
1395  $this->tpl->setVariable('LINK_PROP', $prop['link']);
1396  $this->tpl->setVariable('LINK_VAL_PROP', $prop['value']);
1397  } else {
1398  $this->tpl->setVariable('VAL_PROP', $prop['value']);
1399  }
1400  //END WebDAV: Support links in property values.
1401  $this->tpl->parseCurrentBlock();
1402 
1403  $cnt++;
1404  }
1405  $this->tpl->setCurrentBlock('item_properties');
1406  $this->tpl->parseCurrentBlock();
1407  }
1408  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ insertSearchFragment()

ilObjectListGUI::insertSearchFragment ( )

Insert highlighted search fragment.

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

References getSearchFragment().

1184  : void
1185  {
1186  if (strlen($this->getSearchFragment())) {
1187  $this->tpl->setCurrentBlock('search_fragment');
1188  $this->tpl->setVariable('TXT_SEARCH_FRAGMENT', $this->getSearchFragment() . ' ...');
1189  $this->tpl->parseCurrentBlock();
1190  }
1191  }
+ Here is the call graph for this function:

◆ insertSubItems()

ilObjectListGUI::insertSubItems ( )

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

Referenced by ilCourseObjectiveListGUI\getObjectiveListItemHTML().

2664  : void
2665  {
2666  foreach ($this->sub_item_html as $sub_html) {
2667  $this->tpl->setCurrentBlock('subitem');
2668  $this->tpl->setVariable('SUBITEM', $sub_html);
2669  $this->tpl->parseCurrentBlock();
2670  }
2671  }
+ Here is the caller graph for this function:

◆ insertSubscribeCommand()

ilObjectListGUI::insertSubscribeCommand ( )

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

References ilObject\_lookupObjId(), ilObject\_lookupType(), ANONYMOUS_USER_ID, checkCommandAccess(), ILIAS\Repository\ctrl(), getCommandId(), getContainerObject(), insertCommand(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\user().

Referenced by populateCommands().

1783  : void
1784  {
1785  if ($this->std_cmd_only
1786  || $this->user->getId() === ANONYMOUS_USER_ID
1787  || !$this->getContainerObject() instanceof ilDesktopItemHandling
1788  || $this->settings->get('rep_favourites', '0') !== '1') {
1789  return;
1790  }
1791 
1793 
1794  // #17467 - add ref_id to link (in repository only!)
1795  if (
1796  is_object($this->container_obj) &&
1797  !($this->container_obj instanceof ilAdministrationCommandHandling) &&
1798  method_exists($this->container_obj, 'getObject') &&
1799  is_object($this->container_obj->getObject())
1800  ) {
1801  $this->ctrl->setParameter(
1802  $this->container_obj,
1803  'ref_id',
1804  $this->container_obj->getObject()->getRefId()
1805  );
1806  }
1807  if ($this->getContainerObject() instanceof ilDesktopItemHandling) {
1808  $this->ctrl->setParameter($this->container_obj, 'type', $type);
1809  $this->ctrl->setParameter($this->container_obj, 'item_ref_id', $this->getCommandId());
1810 
1811  if (!$this->fav_manager->ifIsFavourite($this->user->getId(), $this->getCommandId())) {
1812  // Pass type and object ID to ilAccess to improve performance
1813  if ($this->checkCommandAccess('read', '', $this->ref_id, $this->type, $this->obj_id)) {
1814  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'addToDesk');
1815  $this->insertCommand($cmd_link, $this->lng->txt('rep_add_to_favourites'));
1816  }
1817  } else {
1818  $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'removeFromDesk');
1819  $this->insertCommand($cmd_link, $this->lng->txt('rep_remove_from_favourites'));
1820  }
1821 
1822  $this->ctrl->clearParameters($this->container_obj);
1823  }
1824  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
static _lookupObjId(int $ref_id)
getCommandId()
get command id Normally the ref id.
get(string $class_name)
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertSubstitutions()

ilObjectListGUI::insertSubstitutions ( )

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

References $data.

Referenced by insertDescription().

1144  : void
1145  {
1146  $fields_shown = false;
1147  foreach ($this->substitutions->getParsedSubstitutions($this->ref_id, $this->obj_id) as $data) {
1148  if ($data['bold']) {
1149  $data['name'] = '<strong>' . $data['name'] . '</strong>';
1150  $data['value'] = '<strong>' . $data['value'] . '</strong>';
1151  }
1152  $this->tpl->touchBlock('std_prop');
1153  $this->tpl->setCurrentBlock('item_property');
1154  if ($data['show_field']) {
1155  $this->tpl->setVariable('TXT_PROP', $data['name']);
1156  }
1157  $this->tpl->setVariable('VAL_PROP', $data['value']);
1158  $this->tpl->parseCurrentBlock();
1159 
1160  if ($data['newline']) {
1161  $this->tpl->touchBlock('newline_prop');
1162  }
1163  $fields_shown = false;
1164  }
1165  }
+ Here is the caller graph for this function:

◆ insertTimingsCommand()

ilObjectListGUI::insertTimingsCommand ( )

ks, 23 OCT 2023: This function is badly named and it already was before the changes made today.

I decided to keept this so, for the time being as changes would be needed in multiple child classes and as this should change anyway.

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

References checkCommandAccess(), ILIAS\Repository\ctrl(), insertCommand(), and ILIAS\Repository\lng().

Referenced by populateCommands().

1903  : void
1904  {
1905  if (
1906  $this->std_cmd_only || is_null($this->container_obj) ||
1907  !method_exists($this->container_obj, 'getObject') ||
1908  !is_object($this->container_obj->getObject())
1909  ) {
1910  return;
1911  }
1912 
1913  $parent_ref_id = $this->container_obj->getObject()->getRefId();
1914  $parent_type = $this->container_obj->getObject()->getType();
1915 
1916  // #18737
1917  if ($this->reference_ref_id) {
1918  $this->ctrl->setParameterByClass('ilconditionhandlergui', 'ref_id', $this->reference_ref_id);
1919  }
1920 
1921  if (
1922  $this->checkCommandAccess('write', '', $parent_ref_id, $parent_type) ||
1923  $this->checkCommandAccess('write', '', $this->ref_id, $this->type)
1924  ) {
1925  $this->ctrl->setParameterByClass(
1926  get_class($this->container_obj),
1927  'tl_id',
1928  $this->ref_id
1929  );
1930  $time_limit_link = $this->ctrl->getLinkTargetByClass(
1931  get_class($this->container_obj),
1932  'editAvailabilityPeriod'
1933  );
1934  $this->insertCommand($time_limit_link, $this->lng->txt('edit_availability_period'));
1935  $this->ctrl->clearParameterByClass(
1936  get_class($this->container_obj),
1937  'tl_id',
1938  );
1939 
1940  $this->ctrl->setParameterByClass(
1941  'ilconditionhandlergui',
1942  'cadh',
1943  $this->ajax_hash
1944  );
1945  $this->ctrl->setParameterByClass(
1946  'ilconditionhandlergui',
1947  'parent_id',
1949  );
1950 
1951  $availbility_link = $this->ctrl->getLinkTargetByClass(
1952  [$this->gui_class_name, 'ilcommonactiondispatchergui', 'ilobjectactivationgui', 'ilconditionhandlergui'],
1953  'listConditions'
1954  );
1955 
1956  $this->insertCommand($availbility_link, $this->lng->txt('preconditions'));
1957  }
1958 
1959  if ($this->reference_ref_id) {
1960  $this->ctrl->setParameterByClass('ilconditionhandlergui', 'ref_id', $this->ref_id);
1961  }
1962  }
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertTitle()

ilObjectListGUI::insertTitle ( )

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

References appendRepositoryFrameParameter(), buildGotoLink(), getCommandsStatus(), getTitle(), modifySAHSlaunch(), and modifyTitleLink().

1077  : void
1078  {
1079  if ($this->restrict_to_goto) {
1080  $this->default_command = [
1081  'frame' => '',
1082  'link' => $this->buildGotoLink()
1083  ];
1084  }
1085  // begin-patch lok
1086  if (
1087  !$this->default_command ||
1088  (!$this->getCommandsStatus() && !$this->restrict_to_goto) ||
1089  $this->title_link_disabled
1090  ) {
1091  // end-patch lok
1092  $this->tpl->setCurrentBlock('item_title');
1093  $this->tpl->setVariable('TXT_TITLE', $this->getTitle());
1094  } else {
1095  $this->default_command['link'] = $this->modifyTitleLink($this->default_command['link']);
1096 
1097  list($this->default_command['link'], $this->default_command['frame']) =
1098  $this->modifySAHSlaunch($this->default_command['link'], $this->default_command['frame']);
1099 
1100  if ($this->default_command['frame'] != '') {
1101  $this->tpl->setCurrentBlock('title_linked_frame');
1102  $this->tpl->setVariable('TARGET_TITLE_LINKED', $this->default_command['frame']);
1103  $this->tpl->parseCurrentBlock();
1104  }
1105 
1106  // workaround for repository frameset
1107  $this->default_command['link'] = $this->appendRepositoryFrameParameter($this->default_command['link']);
1108 
1109  // the default command is linked with the title
1110  $this->tpl->setCurrentBlock('item_title_linked');
1111  $this->tpl->setVariable('TXT_TITLE_LINKED', $this->getTitle());
1112  $this->tpl->setVariable('HREF_TITLE_LINKED', $this->default_command['link']);
1113 
1114  // New Preview Implementation, File-Objects only
1115  if ($this->type === 'file') {
1116  $preview = new ilObjFilePreviewRendererGUI($this->obj_id);
1117  if ($preview->has()) {
1118  $this->tpl->setVariable('PREVIEW_GLYPH', $preview->getRenderedTriggerComponents());
1119  $this->tpl->parseCurrentBlock();
1120  }
1121  }
1122  }
1123  $this->tpl->parseCurrentBlock();
1124 
1125  if ($this->bold_title == true) {
1126  $this->tpl->touchBlock('bold_title_start');
1127  $this->tpl->touchBlock('bold_title_end');
1128  }
1129  }
modifySAHSlaunch(string $link, string $target)
workaround: SAHS in new javavasript-created window or iframe
appendRepositoryFrameParameter(string $link)
workaround: all links into the repository (from outside) must tell repository to set up the frameset ...
getTitle()
getTitle overwritten in class.ilObjLinkResourceList.php
modifyTitleLink(string $default_link)
+ Here is the call graph for this function:

◆ isCommentsActivated()

ilObjectListGUI::isCommentsActivated ( string  $type,
int  $ref_id,
int  $obj_id,
bool  $header_actions,
bool  $check_write_access = true 
)
protected

Check comments status against comments settings and context.

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

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

3007  : bool {
3008  if ($this->comments_enabled) {
3009  if (!$this->comments_settings_enabled) {
3010  return true;
3011  }
3012  if ($check_write_access && $this->checkCommandAccess('write', '', $ref_id, $type)) {
3013  return true;
3014  }
3015  // fallback to single object check if no preloaded data
3016  // only the repository does preloadCommonProperties() yet
3017  if (!$header_actions && self::$preload_done) {
3018  if (isset(self::$comments_activation[$obj_id]) &&
3019  self::$comments_activation[$obj_id]) {
3020  return true;
3021  }
3022  } elseif ($this->notes_service->domain()->commentsActive($obj_id)) {
3023  return true;
3024  }
3025  }
3026  return false;
3027  }
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
+ Here is the caller graph for this function:

◆ isExpanded()

ilObjectListGUI::isExpanded ( )

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

References $is_expanded.

Referenced by ilObjLTIConsumerListGUI\insertIconsAndCheckboxes().

379  : bool
380  {
381  return $this->is_expanded;
382  }
+ Here is the caller graph for this function:

◆ isMode()

ilObjectListGUI::isMode ( string  $mode)

check current output mode

Parameters
string$mode(self::IL_LIST_FULL | self::IL_LIST_AS_TRIGGER)
Returns
bool true if current mode is $a_mode

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

References $mode.

Referenced by populateCommands().

1227  : bool
1228  {
1229  return $mode === $this->mode;
1230  }
+ 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 2927 of file class.ilObjectListGUI.php.

2927  : bool
2928  {
2929  return false;
2930  }

◆ isTitleBold()

ilObjectListGUI::isTitleBold ( )

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

2937  : bool
2938  {
2939  return $this->bold_title;
2940  }

◆ isVisibleOnlyForced()

ilObjectListGUI::isVisibleOnlyForced ( )

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

References $force_visible_only.

Referenced by checkCommandAccess().

977  : bool
978  {
980  }
+ Here is the caller graph for this function:

◆ modifySAHSlaunch()

ilObjectListGUI::modifySAHSlaunch ( string  $link,
string  $target 
)

workaround: SAHS in new javavasript-created window or iframe

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

References ILIAS\FileDelivery\http().

Referenced by insertTitle().

2525  : array
2526  {
2527  if (strstr($link, ilSAHSPresentationGUI::class) === false) {
2528  return [$link, $target];
2529  }
2530 
2531  $sahs_obj = new ilObjSAHSLearningModule($this->ref_id);
2532  $om = $sahs_obj->getOpenMode();
2533  $width = $sahs_obj->getWidth();
2534  $height = $sahs_obj->getHeight();
2535  if (($om == 5 || $om == 1) && $width > 0 && $height > 0) {
2536  $om++;
2537  }
2538  if ($om !== 0 && !$this->http->agent()->isMobile()) {
2539  $this->default_command['frame'] = '';
2540  $link =
2541  'javascript:void(0); onclick=startSAHS(\'' .
2542  $link .
2543  '\',\'' .
2544  $target .
2545  '\',' .
2546  $om .
2547  ',' .
2548  $width .
2549  ',' .
2550  $height .
2551  ');'
2552  ;
2553  } else {
2554  $target = "ilContObj" . $this->ref_id;
2555  }
2556  return [$link, $target];
2557  }
static http()
Fetches the global http state from ILIAS.
Class ilObjSCORMLearningModule.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modifyTitleLink()

ilObjectListGUI::modifyTitleLink ( string  $default_link)
protected

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

References $params.

Referenced by insertTitle().

2502  : string
2503  {
2504  if ($this->default_command_params) {
2505  $params = [];
2506  foreach ($this->default_command_params as $name => $value) {
2507  $params[] = $name . '=' . $value;
2508  }
2509  $params = implode('&', $params);
2510 
2511 
2512  // #12370
2513  if (!stristr($default_link, '?')) {
2514  $default_link = ($default_link . '?' . $params);
2515  } else {
2516  $default_link = ($default_link . '&' . $params);
2517  }
2518  }
2519  return $default_link;
2520  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
+ Here is the caller graph for this function:

◆ parseConditions()

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

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

References $location, ilConditionHandler\_checkCondition(), ilObject\_lookupTitle(), ilConditionHandler\calculateEffectiveRequiredTriggers(), ilConditionHandler\getEffectiveOptionalConditionsOfTarget(), ilMemberViewSettings\getInstance(), ILIAS\Repository\lng(), and ilConditionHandlerGUI\translateOperator().

Referenced by insertPreconditions().

1422  : bool
1423  {
1424  $num_required = ilConditionHandler::calculateEffectiveRequiredTriggers($this->ref_id, $this->obj_id);
1425  $num_optional_required =
1426  $num_required -
1427  count($conditions) +
1428  count(ilConditionHandler::getEffectiveOptionalConditionsOfTarget($this->ref_id, $this->obj_id))
1429  ;
1430 
1431  // Check if all conditions are fulfilled
1432  $visible_conditions = [];
1433  $passed_optional = 0;
1434  foreach ($conditions as $condition) {
1435  if ($obligatory && !$condition['obligatory']) {
1436  continue;
1437  }
1438  if (!$obligatory && $condition['obligatory']) {
1439  continue;
1440  }
1441 
1442  if ($this->tree->isDeleted($condition['trigger_ref_id'])) {
1443  continue;
1444  }
1445 
1446  $ok = ilConditionHandler::_checkCondition($condition) && !ilMemberViewSettings::getInstance()->isActive();
1447 
1448  if (!$ok) {
1449  $visible_conditions[] = $condition['id'];
1450  }
1451 
1452  if (!$obligatory && $ok) {
1453  ++$passed_optional;
1454  // optional passed
1455  if ($passed_optional >= $num_optional_required) {
1456  return true;
1457  }
1458  }
1459  }
1460 
1461  $missing_cond_exist = false;
1462  foreach ($conditions as $condition) {
1463  if (!in_array($condition['id'], $visible_conditions)) {
1464  continue;
1465  }
1466 
1467  $operator = ilConditionHandlerGUI::translateOperator($condition['trigger_obj_id'], $condition['operator'], $condition['value']);
1468  $cond_txt = $operator . ' ' . $condition['value'];
1469 
1470  // display trigger item
1471  $class = $this->obj_definition->getClassName($condition['trigger_type']);
1472  $location = $this->obj_definition->getLocation($condition['trigger_type']);
1473  if ($class == '' && $location == '') {
1474  continue;
1475  }
1476  $missing_cond_exist = true;
1477 
1478  $full_class = 'ilObj' . $class . 'ListGUI';
1479  $item_list_gui = new $full_class($this->context);
1480  $item_list_gui->setMode(self::IL_LIST_AS_TRIGGER);
1481  $item_list_gui->enablePath(false);
1482  $item_list_gui->enableIcon(true);
1483  $item_list_gui->setConditionDepth($this->condition_depth + 1);
1484  $item_list_gui->setParentRefId($this->ref_id);
1485  $item_list_gui->addCustomProperty($this->lng->txt('precondition_required_itemlist'), $cond_txt, false, true);
1486  $item_list_gui->enableCommands($this->commands_enabled, $this->std_cmd_only);
1487  $item_list_gui->enableProperties($this->properties_enabled);
1488 
1489  $trigger_html = $item_list_gui->getListItemHTML(
1490  $condition['trigger_ref_id'],
1491  $condition['trigger_obj_id'],
1492  ilObject::_lookupTitle($condition['trigger_obj_id']),
1493  ''
1494  );
1495  $this->tpl->setCurrentBlock('precondition');
1496  if ($trigger_html == '') {
1497  $trigger_html = $this->lng->txt('precondition_not_accessible');
1498  }
1499  $this->tpl->setVariable('TXT_CONDITION', trim($cond_txt));
1500  $this->tpl->setVariable('TRIGGER_ITEM', $trigger_html);
1501  $this->tpl->parseCurrentBlock();
1502  }
1503 
1504  if ($missing_cond_exist && $obligatory) {
1505  $this->tpl->setCurrentBlock('preconditions');
1506  $this->tpl->setVariable('CONDITION_TOGGLE_ID', '_obl_' . $toggle_id);
1507  $this->tpl->setVariable('TXT_PRECONDITIONS', $this->lng->txt('preconditions_obligatory_hint'));
1508  $this->tpl->parseCurrentBlock();
1509  } elseif ($missing_cond_exist && !$obligatory) {
1510  $this->tpl->setCurrentBlock('preconditions');
1511  $this->tpl->setVariable('CONDITION_TOGGLE_ID', '_opt_' . $toggle_id);
1512  $this->tpl->setVariable(
1513  'TXT_PRECONDITIONS',
1514  sprintf(
1515  $this->lng->txt('preconditions_optional_hint'),
1516  $num_optional_required - $passed_optional
1517  )
1518  );
1519  $this->tpl->parseCurrentBlock();
1520  }
1521 
1522  return !$missing_cond_exist;
1523  }
$location
Definition: buildRTE.php:22
static translateOperator(int $a_obj_id, string $a_operator, string $value='')
static _checkCondition(array $condition, int $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...
static _lookupTitle(int $obj_id)
static calculateEffectiveRequiredTriggers(int $a_target_ref_id, int $a_target_obj_id, string $a_target_obj_type='')
static getEffectiveOptionalConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_obj_type='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateCommands()

ilObjectListGUI::populateCommands ( bool  $for_header)
private

insert all commands into html code

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

References $txt, appendRepositoryFrameParameter(), commandsNeedToBeHidden(), createDefaultCommand(), ILIAS\Repository\ctrl(), getCommands(), getCommandsStatus(), getInfoScreenStatus(), insertCommand(), insertCommonSocialCommands(), insertCopyCommand(), insertCutCommand(), insertDeleteCommand(), insertInfoScreenCommand(), insertLinkCommand(), insertLPCommand(), insertLPSettingsCommand(), insertMultiDownloadCommand(), insertPasteCommand(), insertSubscribeCommand(), insertTimingsCommand(), isMode(), and ILIAS\Repository\lng().

1969  : void {
1970  $commands = $this->getCommands();
1971  if (!$this->getCommandsStatus() || $this->commandsNeedToBeHidden($for_header)) {
1972  foreach ($commands as $command) {
1973  if ($command['default'] === true) {
1974  $this->default_command = $command['granted'] === true ? $this->createDefaultCommand($command) : [];
1975  }
1976  return;
1977  }
1978  return;
1979  }
1980 
1981  $this->ctrl->setParameterByClass($this->gui_class_name, 'ref_id', $this->ref_id);
1982 
1983  $this->current_actions = [];
1984  $this->default_command = [];
1985  $this->prevent_duplicate_commands = [];
1986 
1987  // we only allow the following commands inside the header actions
1988  $valid_header_commands = ['mount_webfolder'];
1989 
1990  foreach ($commands as $command) {
1991  if ($for_header && !in_array($command['cmd'], $valid_header_commands)
1992  || $command['granted'] === false) {
1993  continue;
1994  }
1995 
1996  if ($command['default'] !== true) {
1997  if (!$this->std_cmd_only) {
1998  // workaround for repository frameset
1999  $command['link'] =
2000  $this->appendRepositoryFrameParameter($command['link']);
2001 
2002  $cmd_link = $command['link'];
2003  $txt = ($command['lang_var'] == '')
2004  ? $command['txt']
2005  : $this->lng->txt($command['lang_var']);
2006  $this->insertCommand(
2007  $cmd_link,
2008  $txt,
2009  $command['frame'],
2010  $command['img'],
2011  $command['cmd']
2012  );
2013  }
2014  } else {
2015  $this->default_command = $this->createDefaultCommand($command);
2016  }
2017  }
2018 
2019  // custom commands
2020  if (is_array($this->cust_commands)) {
2021  foreach ($this->cust_commands as $command) {
2022  if ($command instanceof Button) {
2023  $this->current_actions[] = $command;
2024  continue;
2025  }
2026 
2027  $this->insertCommand(
2028  $command['link'],
2029  $this->lng->txt($command['lang_var']),
2030  $command['frame'],
2031  '',
2032  $command['cmd'] ?? '',
2033  $command['onclick']
2034  );
2035  }
2036  }
2037  $this->insertLPSettingsCommand();
2038 
2039  // info screen command
2040  if ($this->getInfoScreenStatus()) {
2041  $this->insertInfoScreenCommand();
2042  }
2043 
2044  $this->insertLPCommand();
2045 
2046  if (!$this->isMode(self::IL_LIST_AS_TRIGGER)) {
2047  // edit timings
2048  if ($this->timings_enabled) {
2049  $this->insertTimingsCommand();
2050  }
2051 
2052  // delete
2053  if ($this->delete_enabled) {
2054  $this->insertDeleteCommand();
2055  }
2056 
2057  // link
2058  if ($this->link_enabled) {
2059  $this->insertLinkCommand();
2060  }
2061 
2062  // cut
2063  if ($this->cut_enabled) {
2064  $this->insertCutCommand();
2065  }
2066 
2067  // copy
2068  if ($this->copy_enabled) {
2069  $this->insertCopyCommand();
2070  }
2071 
2072  // cut/copy from workspace to repository
2073  if ($this->repository_transfer_enabled) {
2074  $this->insertCutCommand(true);
2075  $this->insertCopyCommand(true);
2076  }
2077 
2078  // subscribe
2079  if ($this->subscribe_enabled) {
2080  $this->insertSubscribeCommand();
2081  }
2082 
2083  // multi download
2084  if ($this->multi_download_enabled && $for_header) {
2085  $this->insertMultiDownloadCommand();
2086  }
2087 
2088  // BEGIN PATCH Lucene search
2089  if ($this->cut_enabled or $this->link_enabled) {
2090  $this->insertPasteCommand();
2091  }
2092  // END PATCH Lucene Search
2093  }
2094 
2095  // common social commands (comment, notes, tags)
2096  if (!$this->isMode(self::IL_LIST_AS_TRIGGER)) {
2097  $this->insertCommonSocialCommands($for_header);
2098  }
2099  }
getCommands()
get all current commands for a specific ref id (in the permission context of the current user) ...
appendRepositoryFrameParameter(string $link)
workaround: all links into the repository (from outside) must tell repository to set up the frameset ...
insertCopyCommand(bool $to_repository=false)
commandsNeedToBeHidden(bool $for_header)
Fix bug #12417: We hide the action menu when we are in the public area.
createDefaultCommand(array $command)
Get default command link Overwritten for e.g categories,courses => they return a goto link If search ...
isMode(string $mode)
check current output mode
$txt
Definition: error.php:31
insertLPCommand()
insert learning progress command
insertCutCommand(bool $to_repository=false)
insertTimingsCommand()
ks, 23 OCT 2023: This function is badly named and it already was before the changes made today...
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
insertCommonSocialCommands(bool $header_actions=false)
Insert common social commands (comments, notes, tagging)
+ Here is the call graph for this function:

◆ preloadCommonProperties()

static ilObjectListGUI::preloadCommonProperties ( array  $obj_ids,
int  $context 
)
static

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

Referenced by ilObjectListGUIPreloader\preload().

2942  : void
2943  {
2944  global $DIC;
2945  $lng = $DIC->language();
2946  $ilSetting = $DIC->settings();
2947  $ilUser = $DIC->user();
2948  $notes_manager = $DIC->notes()->internal()->domain()->notes();
2949 
2950  if ($context == self::CONTEXT_REPOSITORY) {
2951  $active_notes = !$ilSetting->get('disable_notes');
2952  $active_comments = !$ilSetting->get('disable_comments');
2953 
2954  if ($active_comments) {
2955  // needed for action
2956  self::$comments_activation = $DIC->notes()
2957  ->internal()
2958  ->domain()
2959  ->notes()->commentsActiveMultiple($obj_ids);
2960  }
2961 
2962  // properties are optional
2963  if ($ilSetting->get('comments_tagging_in_lists')) {
2964  if ($active_notes || $active_comments) {
2965  // @todo: should be refactored, see comment in notes db repo
2966  self::$cnt_notes = $notes_manager->countNotesAndCommentsMultipleObjects(
2967  $obj_ids,
2968  true
2969  );
2970 
2971  $lng->loadLanguageModule('notes');
2972  }
2973 
2974  $tags_set = new ilSetting('tags');
2975  if ($tags_set->get('enable')) {
2976  $all_users = (bool) $tags_set->get('enable_all_users');
2977 
2978  if (!$ilSetting->get('comments_tagging_in_lists_tags')) {
2979  self::$cnt_tags = ilTagging::_countTags($obj_ids, $all_users);
2980  } else {
2981  $tag_user_id = null;
2982  if (!$all_users) {
2983  $tag_user_id = $ilUser->getId();
2984  }
2985  self::$tags = ilTagging::_getListTagsForObjects($obj_ids, $tag_user_id);
2986  }
2987 
2988  $lng->loadLanguageModule('tagging');
2989  }
2990  }
2991 
2992  $lng->loadLanguageModule('rating');
2993  }
2994 
2995  self::$preload_done = true;
2996  }
loadLanguageModule(string $a_module)
Load language module.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _countTags(array $a_obj_ids, bool $a_all_users=false)
Count all tags for repository objects.
global $DIC
Definition: shib_login.php:22
static _getListTagsForObjects(array $a_obj_ids, ?int $a_user_id=null)
Get tags for given object ids.
global $ilSetting
Definition: privfeed.php:31
+ Here is the caller graph for this function:

◆ prepareJsLinks()

static ilObjectListGUI::prepareJsLinks ( string  $redraw_url,
string  $notes_url,
string  $tags_url,
?ilGlobalTemplateInterface  $tpl = null 
)
static

Insert js/ajax links into template.

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

References $DIC, and ilTaggingGUI\initJavascript().

Referenced by ilWikiPageGUI\addHeaderAction(), ilObjDataCollectionGUI\addHeaderAction(), ilLMPresentationGUI\getHeaderAction(), ilObjectGUI\initHeaderAction(), ilObject2GUI\initHeaderAction(), ilObjWorkspaceFolderGUI\render(), and ilObjRootFolderGUI\renderObject().

2244  : void {
2245  global $DIC;
2246 
2247  if (is_null($tpl)) {
2248  $tpl = $DIC['tpl'];
2249  }
2250 
2251  //if ($notes_url) {
2252  $DIC->notes()->gui()->initJavascript($notes_url);
2253  //}
2254 
2255  if ($tags_url) {
2256  ilTaggingGUI::initJavascript($tags_url, $tpl);
2257  }
2258 
2259  if ($redraw_url) {
2260  $tpl->addOnLoadCode('il.Object.setRedrawAHUrl("' . $redraw_url . '");');
2261  }
2262  }
static initJavascript(string $a_ajax_url, ?ilGlobalTemplateInterface $a_main_tpl=null)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetConditionTarget()

ilObjectListGUI::resetConditionTarget ( )

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

752  : void
753  {
754  $this->condition_target = [];
755  }

◆ resetCustomData()

ilObjectListGUI::resetCustomData ( )
protected

reset properties and commands

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

2856  : void
2857  {
2858  // #15747
2859  $this->cust_prop = [];
2860  $this->cust_commands = [];
2861  $this->cust_modals = [];
2862  $this->sub_item_html = [];
2863  $this->position_enabled = false;
2864  }

◆ restrictToGoto()

ilObjectListGUI::restrictToGoto ( bool  $value)

Restrict all actions/links to goto.

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

666  : void
667  {
668  $this->restrict_to_goto = $value;
669  }

◆ setAdditionalInformation()

ilObjectListGUI::setAdditionalInformation ( ?string  $val)

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

Referenced by ilSearchResultPresentation\appendAdditionalInformation(), ilObjStudyProgrammeListGUI\getListItemHTML(), and ilObjStudyProgrammeReferenceListGUI\getListItemHTML().

630  : void
631  {
632  $this->additional_information = $val;
633  }
+ Here is the caller graph for this function:

◆ setAjaxHash()

ilObjectListGUI::setAjaxHash ( string  $hash)

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

Referenced by initItem().

2297  : void
2298  {
2299  $this->ajax_hash = $hash;
2300  }
+ Here is the caller graph for this function:

◆ setBoldTitle()

ilObjectListGUI::setBoldTitle ( bool  $bold_title)

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

2932  : void
2933  {
2934  $this->bold_title = $bold_title;
2935  }

◆ setConditionDepth()

ilObjectListGUI::setConditionDepth ( int  $depth)

set depth for precondition output (stops at level 5)

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

1216  : void
1217  {
1218  $this->condition_depth = $depth;
1219  }

◆ setConditionTarget()

ilObjectListGUI::setConditionTarget ( int  $ref_id,
int  $obj_id,
string  $target_type 
)

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

References $obj_id, and $ref_id.

743  : void
744  {
745  $this->condition_target = [
746  'ref_id' => $ref_id,
747  'obj_id' => $obj_id,
748  'target_type' => $target_type
749  ];
750  }

◆ setContainerObject()

ilObjectListGUI::setContainerObject ( object  $container_obj)

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

References $container_obj.

244  : void
245  {
246  $this->container_obj = $container_obj;
247  }

◆ setDefaultCommandParameters()

ilObjectListGUI::setDefaultCommandParameters ( array  $params)

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

References $params.

762  : void
763  {
764  $this->default_command_params = $params;
765  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31

◆ setDescription()

ilObjectListGUI::setDescription ( string  $description)

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

References ILIAS\Repository\refinery().

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

582  : void
583  {
584  $this->description = $this->refinery->encode()->htmlSpecialCharsAsEntities()->transform(
586  );
587  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDetailsLevel()

ilObjectListGUI::setDetailsLevel ( int  $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)

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

645  : void
646  {
647  $this->details_level = $level;
648  }

◆ setExpanded()

ilObjectListGUI::setExpanded ( bool  $status)

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

374  : void
375  {
376  $this->is_expanded = $status;
377  }

◆ setHeaderSubObject()

ilObjectListGUI::setHeaderSubObject ( ?string  $type,
?int  $id 
)

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

References $type, and ILIAS\Repository\int().

2264  : void
2265  {
2266  $this->sub_obj_type = $type;
2267  $this->sub_obj_id = (int) $id;
2268  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ setItemDetailLinks()

ilObjectListGUI::setItemDetailLinks ( array  $detail_links,
string  $intro_txt = '' 
)

set items detail links

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

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

539  : void
540  {
541  $this->item_detail_links = $detail_links;
542  $this->item_detail_links_intro = $intro_txt;
543  }

◆ setMode()

ilObjectListGUI::setMode ( string  $mode)

set output mode

Parameters
string$modeoutput mode (self::IL_LIST_FULL | self::IL_LIST_AS_TRIGGER)

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

References $mode.

1198  : void
1199  {
1200  $this->mode = $mode;
1201  }

◆ setParentRefId()

ilObjectListGUI::setParentRefId ( int  $ref_id)

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

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

2869  : void
2870  {
2871  $this->parent_ref_id = $ref_id;
2872  }

◆ setPositionInputField()

ilObjectListGUI::setPositionInputField ( string  $field_index,
string  $position_value 
)
Parameters
string$field_indexe.g. '[crs][34]'
string$position_valuee.g. '2.0'

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

References $position_value.

387  : void
388  {
389  $this->position_enabled = true;
390  $this->position_field_index = $field_index;
391  $this->position_value = $position_value;
392  }

◆ setRelevance()

ilObjectListGUI::setRelevance ( int  $rel)

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

334  : void
335  {
336  $this->relevance = $rel;
337  }

◆ setSearchFragment()

ilObjectListGUI::setSearchFragment ( string  $text)
Parameters
string$texthighlighted search fragment

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

600  : void
601  {
602  $this->search_fragment = $text;
603  }

◆ setSeparateCommands()

ilObjectListGUI::setSeparateCommands ( bool  $val)

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

610  : void
611  {
612  $this->separate_commands = $val;
613  }

◆ setTitle()

ilObjectListGUI::setTitle ( string  $title)

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

References ILIAS\Repository\refinery().

Referenced by getHeaderAction(), ilCourseObjectiveListGUI\getObjectiveListItemHTML(), ilObjStudyProgrammeReferenceListGUI\initItem(), and initItem().

567  : void
568  {
569  $this->title = $this->refinery->encode()->htmlSpecialCharsAsEntities()->transform(
570  $title
571  );
572  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeAccessCache()

ilObjectListGUI::storeAccessCache ( )

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

2692  : void
2693  {
2694  if ($this->acache->getLastAccessStatus() == 'miss' && !$this->prevent_access_caching) {
2695  $this->acache->storeEntry(
2696  $this->user->getId() . ':' . $this->ref_id,
2697  serialize($this->access_cache),
2699  );
2700  }
2701  }

Field Documentation

◆ $acache

ilListItemAccessCache ilObjectListGUI::$acache
protected

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

◆ $access

ilAccessHandler ilObjectListGUI::$access
protected

◆ $access_cache

array ilObjectListGUI::$access_cache
protected

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

◆ $additional_information

string ilObjectListGUI::$additional_information = ''
protected

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

Referenced by getAdditionalInformation().

◆ $adm_commands_included

bool ilObjectListGUI::$adm_commands_included
protected

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

◆ $ajax_hash

string ilObjectListGUI::$ajax_hash
protected

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

Referenced by getHeaderAction().

◆ $bold_title

bool ilObjectListGUI::$bold_title = false
protected

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

◆ $checkboxes_enabled

bool ilObjectListGUI::$checkboxes_enabled = false
protected

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

Referenced by getCheckboxStatus().

◆ $clipboard

ClipboardManager ilObjectListGUI::$clipboard
protected

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

◆ $cnt_notes

array ilObjectListGUI::$cnt_notes = []
staticprotected

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

◆ $cnt_tags

array ilObjectListGUI::$cnt_tags = []
staticprotected

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

◆ $commands

array ilObjectListGUI::$commands = []
protected

◆ $commands_enabled

bool ilObjectListGUI::$commands_enabled = true
protected

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

Referenced by getCommandsStatus().

◆ $comments_activation

array ilObjectListGUI::$comments_activation = []
staticprotected

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

◆ $comments_enabled

bool ilObjectListGUI::$comments_enabled = false
protected

◆ $comments_settings_enabled

bool ilObjectListGUI::$comments_settings_enabled = false
protected

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

◆ $condition_depth

int ilObjectListGUI::$condition_depth = 0
protected

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

◆ $condition_target

array ilObjectListGUI::$condition_target
protected

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

◆ $container_obj

object ilObjectListGUI::$container_obj = null
protected

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

Referenced by getContainerObject(), and setContainerObject().

◆ $context

int ilObjectListGUI::$context
protected

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

Referenced by ilObjFileListGUI\__construct().

◆ $copy_enabled

bool ilObjectListGUI::$copy_enabled = true
protected

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

Referenced by getCopyStatus().

◆ $ctrl

◆ $current_actions

array ilObjectListGUI::$current_actions = []
protected

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

◆ $cust_commands

array ilObjectListGUI::$cust_commands = []
protected

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

◆ $cust_modals

array ilObjectListGUI::$cust_modals = []
protected

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

◆ $cust_prop

array ilObjectListGUI::$cust_prop = []
protected

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

◆ $cut_enabled

bool ilObjectListGUI::$cut_enabled = false
protected

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

Referenced by getCutStatus().

◆ $default_command

array ilObjectListGUI::$default_command = []
protected

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

Referenced by getDefaultCommand().

◆ $default_command_params

array ilObjectListGUI::$default_command_params = []
protected

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

◆ $delete_enabled

bool ilObjectListGUI::$delete_enabled = false
protected

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

Referenced by getDeleteStatus().

◆ $description

◆ $description_enabled

bool ilObjectListGUI::$description_enabled = true
protected

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

Referenced by getDescriptionStatus().

◆ $details_level

int ilObjectListGUI::$details_level = self::DETAILS_ALL
protected

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

Referenced by getDetailsLevel().

◆ $download_checkbox_state

int ilObjectListGUI::$download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE
protected

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

Referenced by getDownloadCheckboxState().

◆ $expand_enabled

bool ilObjectListGUI::$expand_enabled = false
protected

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

Referenced by getExpandStatus().

◆ $fav_manager

ilFavouritesManager ilObjectListGUI::$fav_manager
protected

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

◆ $force_rate_parent

bool ilObjectListGUI::$force_rate_parent = false
protected

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

Referenced by enableRating().

◆ $force_visible_only

bool ilObjectListGUI::$force_visible_only = false
protected

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

Referenced by isVisibleOnlyForced().

◆ $gui_class_name

string ilObjectListGUI::$gui_class_name = ''
protected

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

◆ $header_icons

array ilObjectListGUI::$header_icons = []
protected

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

◆ $http

HTTPServices ilObjectListGUI::$http
protected

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

◆ $icons_enabled

bool ilObjectListGUI::$icons_enabled = false
protected

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

Referenced by getIconStatus().

◆ $info_screen_enabled

bool ilObjectListGUI::$info_screen_enabled = false
protected

◆ $is_expanded

bool ilObjectListGUI::$is_expanded = true
protected

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

Referenced by isExpanded().

◆ $item_detail_links

array ilObjectListGUI::$item_detail_links = []
protected

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

◆ $item_detail_links_enabled

bool ilObjectListGUI::$item_detail_links_enabled = false
protected

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

Referenced by getItemDetailLinkStatus().

◆ $item_detail_links_intro

string ilObjectListGUI::$item_detail_links_intro = ''
protected

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

◆ $js_unique_id

int ilObjectListGUI::$js_unique_id = 0
staticprotected

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

◆ $ldap_mapping

ilLDAPRoleGroupMapping ilObjectListGUI::$ldap_mapping
protected

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

◆ $link_enabled

bool ilObjectListGUI::$link_enabled = false
protected

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

Referenced by getLinkStatus().

◆ $lng

◆ $lp_cmd_enabled

bool ilObjectListGUI::$lp_cmd_enabled = false
protected

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

◆ $lp_settings_cmd_enabled

bool ilObjectListGUI::$lp_settings_cmd_enabled = true
protected

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

◆ $main_tpl

ilGlobalTemplateInterface ilObjectListGUI::$main_tpl
protected

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

Referenced by getHeaderAction().

◆ $mode

string ilObjectListGUI::$mode
protected

◆ $multi_download_enabled

bool ilObjectListGUI::$multi_download_enabled = false
protected

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

◆ $notes_enabled

bool ilObjectListGUI::$notes_enabled = false
protected

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

◆ $notes_service

ILIAS Notes Service ilObjectListGUI::$notes_service
private

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

◆ $notice_prop

array ilObjectListGUI::$notice_prop = []
protected

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

Referenced by getNoticeProperties().

◆ $notice_properties_enabled

bool ilObjectListGUI::$notice_properties_enabled = true
protected

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

Referenced by getNoticePropertiesStatus().

◆ $obj_definition

ilObjectDefinition ilObjectListGUI::$obj_definition
protected

◆ $obj_id

◆ $object_dic

ilObjectDIC ilObjectListGUI::$object_dic
protected

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

◆ $object_properties

ilObjectProperties ilObjectListGUI::$object_properties
protected

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

◆ $parent_ref_id

int ilObjectListGUI::$parent_ref_id
protected

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

◆ $path_enabled

bool ilObjectListGUI::$path_enabled
protected

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

Referenced by getPathStatus().

◆ $path_gui

ilPathGUI ilObjectListGUI::$path_gui = null
protected

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

Referenced by enablePath().

◆ $path_linked

bool ilObjectListGUI::$path_linked = false
protected

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

◆ $path_start_node

int ilObjectListGUI::$path_start_node
protected

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

◆ $position_enabled

bool ilObjectListGUI::$position_enabled = false
protected

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

◆ $position_field_index

string ilObjectListGUI::$position_field_index = ''
protected

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

◆ $position_value

string ilObjectListGUI::$position_value
protected

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

Referenced by setPositionInputField().

◆ $preconditions_enabled

bool ilObjectListGUI::$preconditions_enabled = true
protected

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

Referenced by getPreconditionsStatus().

◆ $preload_done

bool ilObjectListGUI::$preload_done = false
staticprotected

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

◆ $prevent_access_caching

bool ilObjectListGUI::$prevent_access_caching
protected

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

◆ $prevent_duplicate_commands

array ilObjectListGUI::$prevent_duplicate_commands = []
protected

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

◆ $progress_enabled

bool ilObjectListGUI::$progress_enabled = false
protected

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

Referenced by getProgressInfoStatus().

◆ $properties_enabled

bool ilObjectListGUI::$properties_enabled = true
protected

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

Referenced by getPropertiesStatus().

◆ $rating_categories_enabled

bool ilObjectListGUI::$rating_categories_enabled = false
protected

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

◆ $rating_ctrl_path

array ilObjectListGUI::$rating_ctrl_path = null
protected

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

◆ $rating_enabled

bool ilObjectListGUI::$rating_enabled = false
protected

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

◆ $rating_text

string ilObjectListGUI::$rating_text = null
protected

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

◆ $rbacsystem

◆ $ref_id

◆ $reference_obj_id

int ilObjectListGUI::$reference_obj_id = null
protected

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

Referenced by determineProperties().

◆ $reference_ref_id

int ilObjectListGUI::$reference_ref_id = 0
protected

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

Referenced by determineProperties(), and insertCommonSocialCommands().

◆ $refinery

ILIAS Refinery Factory ilObjectListGUI::$refinery
protected

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

◆ $relevance

int ilObjectListGUI::$relevance = 0
protected

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

Referenced by getRelevance().

◆ $repository_transfer_enabled

bool ilObjectListGUI::$repository_transfer_enabled = false
protected

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

◆ $request_wrapper

ILIAS HTTP Wrapper RequestWrapper ilObjectListGUI::$request_wrapper
protected

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

◆ $requested_base_class

string ilObjectListGUI::$requested_base_class
protected

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

◆ $requested_cmd

string ilObjectListGUI::$requested_cmd
protected

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

◆ $requested_ref_id

int ilObjectListGUI::$requested_ref_id
protected

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

Referenced by insertMultiDownloadCommand().

◆ $restrict_to_goto

bool ilObjectListGUI::$restrict_to_goto = false
protected

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

◆ $search_fragment

string ilObjectListGUI::$search_fragment = ''
protected

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

Referenced by getSearchFragment().

◆ $search_fragment_enabled

bool ilObjectListGUI::$search_fragment_enabled = false
protected

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

Referenced by getSearchFragmentStatus().

◆ $search_fragments_enabled

bool ilObjectListGUI::$search_fragments_enabled = false
protected

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

◆ $separate_commands

bool ilObjectListGUI::$separate_commands = false
protected

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

Referenced by getSeparateCommands().

◆ $settings

ilSetting ilObjectListGUI::$settings
protected

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

◆ $shared

bool ilObjectListGUI::$shared = false
protected

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

◆ $static_link_enabled

bool ilObjectListGUI::$static_link_enabled = false
protected

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

◆ $std_cmd_only

bool ilObjectListGUI::$std_cmd_only = false
protected

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

◆ $sub_item_html

array ilObjectListGUI::$sub_item_html = []
protected

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

◆ $sub_obj_id

int ilObjectListGUI::$sub_obj_id
protected

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

◆ $sub_obj_type

string ilObjectListGUI::$sub_obj_type
protected

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

◆ $subscribe_enabled

bool ilObjectListGUI::$subscribe_enabled = false
protected

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

Referenced by getSubscribeStatus().

◆ $substitutions

ilAdvancedMDSubstitution ilObjectListGUI::$substitutions = null
protected

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

◆ $substitutions_enabled

bool ilObjectListGUI::$substitutions_enabled = false
protected

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

Referenced by getSubstitutionStatus().

◆ $tags

array ilObjectListGUI::$tags = []
staticprotected

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

◆ $tags_enabled

bool ilObjectListGUI::$tags_enabled = false
protected

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

◆ $timings_enabled

bool ilObjectListGUI::$timings_enabled = true
protected

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

◆ $title

◆ $title_link

string ilObjectListGUI::$title_link = ''
protected

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

◆ $title_link_disabled

bool ilObjectListGUI::$title_link_disabled = false
protected

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

◆ $tpl

ilTemplate ilObjectListGUI::$tpl
protected

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

◆ $tpl_component

string ilObjectListGUI::$tpl_component = 'components/ILIAS/Container'
staticprotected

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

◆ $tpl_file_name

string ilObjectListGUI::$tpl_file_name = 'tpl.container_list_item.html'
staticprotected

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

◆ $tree

◆ $type

◆ $ui

UIServices ilObjectListGUI::$ui
protected

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

◆ $user

ilObjUser ilObjectListGUI::$user
protected

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

Referenced by ilObjSurveyListGUI\getProperties().

◆ $ws_access

ilWorkspaceAccessHandler ilObjectListGUI::$ws_access
protected

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

◆ CONTEXT_PERSONAL_DESKTOP

const ilObjectListGUI::CONTEXT_PERSONAL_DESKTOP = 5

◆ CONTEXT_REPOSITORY

◆ CONTEXT_SEARCH

const ilObjectListGUI::CONTEXT_SEARCH = 6

◆ CONTEXT_WORKSPACE

◆ CONTEXT_WORKSPACE_SHARING

const ilObjectListGUI::CONTEXT_WORKSPACE_SHARING = 4

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

◆ DETAILS_ALL

◆ DETAILS_MINIMAL

const ilObjectListGUI::DETAILS_MINIMAL = 10

◆ DETAILS_SEARCH

const ilObjectListGUI::DETAILS_SEARCH = 20

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

◆ DOWNLOAD_CHECKBOX_DISABLED

const ilObjectListGUI::DOWNLOAD_CHECKBOX_DISABLED = 2

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

◆ DOWNLOAD_CHECKBOX_ENABLED

const ilObjectListGUI::DOWNLOAD_CHECKBOX_ENABLED = 1

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

◆ DOWNLOAD_CHECKBOX_NONE

const ilObjectListGUI::DOWNLOAD_CHECKBOX_NONE = 0

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

◆ IL_LIST_AS_TRIGGER

const ilObjectListGUI::IL_LIST_AS_TRIGGER = 'trigger'

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

◆ IL_LIST_FULL

const ilObjectListGUI::IL_LIST_FULL = 'full'

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


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