ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjCategoryReferenceListGUI Class Reference
+ Inheritance diagram for ilObjCategoryReferenceListGUI:
+ Collaboration diagram for ilObjCategoryReferenceListGUI:

Public Member Functions

 getIconImageType ()
 
 getTypeIcon ()
 
 getCommandId ()
 
 insertTimingsCommand ()
 
 init ()
 
 initItem (int $ref_id, int $obj_id, string $type, string $title="", string $description="")
 
 getProperties ()
 
 checkCommandAccess (string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
 
 getCommandLink (string $cmd)
 
- Public Member Functions inherited from ilObjCategoryListGUI
 init ()
 initialisation More...
 
 getInfoScreenStatus ()
 
 getCommandLink (string $cmd)
 
 checkInfoPageOnAsynchronousRendering ()
 
- Public Member Functions inherited from ilObjectListGUI
 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)
 
 enableRelevance (bool $status)
 
 enabledRelevance ()
 
 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...
 
 insertRelevance ()
 
 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 ()
 
 insertCommands (bool $use_async=false, bool $get_async_commands=false, string $async_url="", bool $header_actions=false)
 insert all commands into html code 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 $wtarget)
 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, bool $use_async=false, bool $get_async_commands=false, string $async_url="")
 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 ()
 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...
 

Protected Attributes

int $reference_obj_id = null
 
int $reference_ref_id
 
bool $deleted = false
 
StandardGUIRequest $cont_ref_request
 
- Protected Attributes inherited from ilObjCategoryListGUI
StandardGUIRequest $cat_request
 
- Protected Attributes inherited from ilObjectListGUI
bool $force_rate_parent = false
 
array $access_cache
 
ilAccessHandler $access
 
ilObjUser $user
 
ilObjectDefinition $obj_definition
 
ilTree $tree
 
ilSetting $settings
 
UIServices $ui
 
ilRbacSystem $rbacsystem
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
string $mode
 
bool $path_enabled
 
int $context
 
ilObjectService $object_service
 
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
 
bool $enabled_relevance = 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
 
ilAdvancedSelectionListGUI $current_selection_list
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectListGUI
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 inherited from ilObjectListGUI
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 inherited from ilObjectListGUI
 enableLearningProgress (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...
 
 getTileImagePath ()
 
- Static Protected Attributes inherited from ilObjectListGUI
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 = "Services/Container"
 

Detailed Description

Member Function Documentation

◆ checkCommandAccess()

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

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

References ilObjectListGUI\$obj_id, and getCommandId().

153  : bool {
154  // Check edit reference against reference edit permission
155  switch ($cmd) {
156  case 'editReference':
157  return parent::checkCommandAccess($permission, $cmd, $this->getCommandId(), $type, $obj_id);
158  }
159 
160  switch ($permission) {
161  case 'copy':
162  case 'delete':
163  // check against target ref_id
164  return parent::checkCommandAccess($permission, $cmd, $this->getCommandId(), $type, $obj_id);
165 
166  default:
167  // check against reference
168  return parent::checkCommandAccess($permission, $cmd, $ref_id, $type, $obj_id);
169  }
170  }
+ Here is the call graph for this function:

◆ getCommandId()

ilObjCategoryReferenceListGUI::getCommandId ( )

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

References $reference_ref_id.

Referenced by checkCommandAccess(), getCommandLink(), and getTypeIcon().

+ Here is the caller graph for this function:

◆ getCommandLink()

ilObjCategoryReferenceListGUI::getCommandLink ( string  $cmd)

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

References ilObjectListGUI\$ctrl, getCommandId(), and ilCtrlInterface\setParameterByClass().

172  : string
173  {
174  $ilCtrl = $this->ctrl;
175 
176  switch ($cmd) {
177  case 'editReference':
178  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->getCommandId());
179  $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
180  $ilCtrl->setParameterByClass(
181  "ilrepositorygui",
182  "ref_id",
183  $this->cont_ref_request->getRefId()
184  );
185  return $cmd_link;
186 
187  default:
188  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
189  $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
190  $ilCtrl->setParameterByClass(
191  "ilrepositorygui",
192  "ref_id",
193  $this->cont_ref_request->getRefId()
194  );
195  return $cmd_link;
196  }
197  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
Sets a parameter for the given GUI class and appends the given value as well.
ilCtrlInterface $ctrl
+ Here is the call graph for this function:

◆ getIconImageType()

ilObjCategoryReferenceListGUI::getIconImageType ( )

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

51  : string
52  {
53  return 'catr';
54  }

◆ getProperties()

ilObjCategoryReferenceListGUI::getProperties ( )

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

References ilObjectListGUI\$lng, ilObjectListGUI\$tree, ilTree\isDeleted(), and ilLanguage\txt().

129  : array
130  {
131  $lng = $this->lng;
132  $tree = $this->tree;
133 
134  $props = parent::getProperties();
135 
136  // offline
137  if ($tree->isDeleted($this->ref_id)) {
138  $props[] = [
139  "alert" => true, "property" => $lng->txt("status"),
140  "value" => $lng->txt("reference_deleted")
141  ];
142  }
143 
144  return $props;
145  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
+ Here is the call graph for this function:

◆ getTypeIcon()

ilObjCategoryReferenceListGUI::getTypeIcon ( )

Definition at line 56 of file class.ilObjCategoryReferenceListGUI.php.

References ilObject\_getIcon(), ilObject\_lookupObjId(), and getCommandId().

56  : string
57  {
59  return ilObject::_getIcon(
61  'small'
62  );
63  }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupObjId(int $ref_id)
+ Here is the call graph for this function:

◆ init()

ilObjCategoryReferenceListGUI::init ( )

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

References ilAdvancedMDSubstitution\_getInstanceByObjectType().

75  : void
76  {
77  $this->copy_enabled = true;
78  $this->static_link_enabled = false;
79  $this->delete_enabled = true;
80  $this->cut_enabled = true;
81  $this->subscribe_enabled = true;
82  $this->link_enabled = false;
83  $this->info_screen_enabled = true;
84  $this->type = "cat";
85  $this->gui_class_name = "ilobjcategorygui";
86 
87  $this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
88  if ($this->substitutions->isActive()) {
89  $this->substitutions_enabled = true;
90  }
91  }
static _getInstanceByObjectType(string $a_type)
+ Here is the call graph for this function:

◆ initItem()

ilObjCategoryReferenceListGUI::initItem ( int  $ref_id,
int  $obj_id,
string  $type,
string  $title = "",
string  $description = "" 
)

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

References ilObjectListGUI\$access, ilObjectListGUI\$obj_id, ilObjectListGUI\$ref_id, ilObjectListGUI\$tree, ilObject\_getAllReferences(), ilObjectAccess\_getCommands(), ilObject\_lookupDescription(), ilContainerReference\_lookupTargetId(), ilContainerReference\_lookupTitle(), and ilTree\isDeleted().

99  : void {
100  $ilAccess = $this->access;
101  $tree = $this->tree;
102 
103  $this->reference_ref_id = $ref_id;
104  $this->reference_obj_id = $obj_id;
105 
106  include_once('./Services/ContainerReference/classes/class.ilContainerReference.php');
108 
109  $target_ref_ids = ilObject::_getAllReferences($target_obj_id);
110  $target_ref_id = current($target_ref_ids);
112  $target_description = ilObject::_lookupDescription($target_obj_id);
113 
114  $this->deleted = !$target_ref_id || $tree->isDeleted($target_ref_id);
115 
116  parent::initItem((int) $target_ref_id, $target_obj_id, $type, $target_title, $target_description);
117 
118  // general commands array
119  $this->commands = ilObjCategoryReferenceAccess::_getCommands($this->reference_ref_id);
120 
121  if ($this->deleted || $ilAccess->checkAccess('write', '', $this->reference_ref_id)) {
122  $this->info_screen_enabled = false;
123  } else {
124  $this->info_screen_enabled = true;
125  }
126  }
static _lookupTitle(int $obj_id)
static _getAllReferences(int $id)
get all reference ids for object ID
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
ilAccessHandler $access
static _getCommands()
get commands
static _lookupDescription(int $obj_id)
static _lookupTargetId(int $a_obj_id)
+ Here is the call graph for this function:

◆ insertTimingsCommand()

ilObjCategoryReferenceListGUI::insertTimingsCommand ( )

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

71  : void
72  {
73  }

Field Documentation

◆ $cont_ref_request

StandardGUIRequest ilObjCategoryReferenceListGUI::$cont_ref_request
protected

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

◆ $deleted

bool ilObjCategoryReferenceListGUI::$deleted = false
protected

Definition at line 30 of file class.ilObjCategoryReferenceListGUI.php.

◆ $reference_obj_id

int ilObjCategoryReferenceListGUI::$reference_obj_id = null
protected

Definition at line 28 of file class.ilObjCategoryReferenceListGUI.php.

◆ $reference_ref_id

int ilObjCategoryReferenceListGUI::$reference_ref_id
protected

Definition at line 29 of file class.ilObjCategoryReferenceListGUI.php.

Referenced by getCommandId().


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