ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjFileListGUI Class Reference

Class ilObjFileListGUI. More...

+ Inheritance diagram for ilObjFileListGUI:
+ Collaboration diagram for ilObjFileListGUI:

Public Member Functions

 __construct (int $context=self::CONTEXT_REPOSITORY)
 
 init ()
 initialisation More...
 
 getCommands ()
 
 getCommandLink (string $cmd)
 
 getTitle ()
 
 stripTitleOfFileExtension (string $a_title)
 
 getCommandFrame (string $cmd)
 
 getIconImageType ()
 Returns the icon image type. More...
 
 getProperties ()
 Get item properties. More...
 
 getCommandImage ($a_cmd)
 Get command icon image. More...
 
 checkCommandAccess (string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
 
- 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 ()
 ks, 23 OCT 2023: This function is badly named and it already was before the changes made today. More...
 
 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 $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, 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 Member Functions

 updateContext ()
 
- 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...
 

Protected Attributes

string $title
 
- Protected Attributes inherited from ilObjectListGUI
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
 
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
 

Private Attributes

ilObjFileInfoRepository $file_info
 
CapabilityBuilder $capability_builder
 
CapabilityCollection $capabilities = null
 
Context $capability_context
 
IconDatabaseRepository $icon_repo
 
Services $irss
 

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
 
- 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

Constructor & Destructor Documentation

◆ __construct()

ilObjFileListGUI::__construct ( int  $context = self::CONTEXT_REPOSITORY)

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

References ilObjectListGUI\$context, $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\access(), and ILIAS\Repository\ctrl().

47  {
48  global $DIC;
49  $this->capability_context = new Context(
50  0,
51  0,
52  match($context) {
53  self::CONTEXT_REPOSITORY => Context::CONTEXT_REPO,
54  self::CONTEXT_WORKSPACE => Context::CONTEXT_WORKSPACE,
55  self::CONTEXT_SEARCH => Context::CONTEXT_SEARCH,
56  default => Context::CONTEXT_REPO,
57  }
58  );
59 
61 
62 
63  $DIC->language()->loadLanguageModule('wopi');
64  $this->file_info = new ilObjFileInfoRepository();
65  $this->capability_builder = new CapabilityBuilder(
66  $this->file_info,
67  $this->access,
68  $this->ctrl,
69  new ActionDBRepository($DIC->database()),
70  $DIC->http()
71  );
72 
73 
74  }
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkCommandAccess()

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

Definition at line 270 of file class.ilObjFileListGUI.php.

References ilObjectListGUI\$obj_id, and updateContext().

276  : bool {
277  $this->updateContext();
278 
279  $this->capability_context = $this->capability_context
280  ->withCallingId($ref_id)
281  ->withObjectId($obj_id ?? $this->capability_context->getObjectId());
282 
283  // LP settings only in repository
284  if ($this->context !== self::CONTEXT_REPOSITORY && $permission === "edit_learning_progress") {
285  return false;
286  }
287 
288  $this->capabilities = $this->capability_builder->get($this->capability_context);
289 
290  $capability = Capabilities::fromCommand($cmd);
291  $additional_check = $this->capabilities->get($capability)->isUnlocked();
292 
293  return $additional_check && parent::checkCommandAccess(
294  $permission,
295  $cmd,
296  $ref_id,
297  $type,
298  $obj_id
299  );
300  }
+ Here is the call graph for this function:

◆ getCommandFrame()

ilObjFileListGUI::getCommandFrame ( string  $cmd)

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

References updateContext().

165  : string
166  {
167  $this->updateContext();
168  $info = $this->file_info->getByObjectId($this->obj_id);
169 
170  if ($cmd === Capabilities::DOWNLOAD->value) {
171  return $info->shouldDeliverInline() ? '_blank' : '';
172  }
173 
174  return '';
175  }
+ Here is the call graph for this function:

◆ getCommandImage()

ilObjFileListGUI::getCommandImage (   $a_cmd)

Get command icon image.

Definition at line 265 of file class.ilObjFileListGUI.php.

265  : string
266  {
267  return "";
268  }

◆ getCommandLink()

ilObjFileListGUI::getCommandLink ( string  $cmd)

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

References ilObjFileAccess\_shouldDownloadDirectly(), ILIAS\Repository\ctrl(), and updateContext().

Referenced by getProperties().

124  : string
125  {
126  $this->updateContext();
127  $this->capabilities = $this->capability_builder->get($this->capability_context);
128 
129  $needed_capability = Capabilities::fromCommand($cmd);
130  $capability = $this->capabilities->get($needed_capability);
131  if ($capability === false || !$capability->isUnlocked()) {
132  return '';
133  }
134 
135  switch ($this->context) {
136  case self::CONTEXT_REPOSITORY:
137  return (string) $capability->getURI();
138  case self::CONTEXT_WORKSPACE:
139  $this->ctrl->setParameterByClass(ilObjFileGUI::class, 'wsp_id', $this->ref_id);
140  if ($cmd === "sendfile" && !ilObjFileAccess::_shouldDownloadDirectly($this->obj_id)) {
141  return $this->ctrl->getLinkTargetByClass(
142  ilObjFileGUI::class,
143  Capabilities::INFO_PAGE->value
144  );
145  }
146  break;
147 
148  }
149 
150  return parent::getCommandLink($cmd);
151  }
static _shouldDownloadDirectly(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCommands()

ilObjFileListGUI::getCommands ( )

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

References ILIAS\LTI\ToolProvider\$key, and updateContext().

107  : array
108  {
109  $this->updateContext();
110  $this->capabilities = $this->capability_builder->get($this->capability_context);
111 
112  $best = $this->capabilities->getBest();
113 
114  foreach ($this->commands as $key => $command) {
115  if ($command['cmd'] === $best->getCapability()->value) {
116  $default_set = true;
117  $this->commands[$key]['default'] = true;
118  }
119  }
120 
121  return parent::getCommands();
122  }
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:

◆ getIconImageType()

ilObjFileListGUI::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 184 of file class.ilObjFileListGUI.php.

References ilObjectListGUI\$type.

184  : string
185  {
186  return $this->file_info->getByObjectId($this->obj_id)->shouldDeliverInline()
187  ? $this->type . '_inline'
188  : $this->type;
189  }

◆ getProperties()

ilObjFileListGUI::getProperties ( )

Get item properties.

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 199 of file class.ilObjFileListGUI.php.

References $DIC, $version, ilDatePresentation\formatDate(), getCommandLink(), and IL_CAL_UNIX.

199  : array
200  {
201  global $DIC;
202 
203  $this->capabilities = $this->capability_builder->get($this->capability_context);
204 
205  $props = parent::getProperties();
206 
207  $info = $this->file_info->getByObjectId($this->obj_id);
208 
209  $props[] = [
210  "alert" => false,
211  "property" => $DIC->language()->txt("type"),
212  "value" => $info->getSuffix(),
213  'propertyNameVisible' => false,
214  ];
215 
216  $props[] = [
217  "alert" => false,
218  "property" => $DIC->language()->txt("size"),
219  "value" => (string) $info->getFileSize(),
220  'propertyNameVisible' => false,
221  ];
222 
223  $version = $info->getVersion();
224  if ($version > 1) {
225 
226  // add versions link
227  if ($this->capabilities->get(Capabilities::MANAGE_VERSIONS)->isUnlocked()) {
228  $link = $this->getCommandLink("versions");
229  $value = "<a href=\"$link\">" . $DIC->language()->txt("version") . ": $version</a>";
230  } else {
231  $value = $DIC->language()->txt("version") . ": $version";
232  }
233  $props[] = [
234  "alert" => false,
235  "property" => $DIC->language()->txt("version"),
236  "value" => $value,
237  "propertyNameVisible" => false
238  ];
239  }
240 
241  $props[] = [
242  "alert" => false,
243  "property" => $DIC->language()->txt("last_update"),
245  new ilDateTime($info->getCreationDate()->format('U'), IL_CAL_UNIX)
246  ),
247  'propertyNameVisible' => false,
248  ];
249 
250  if ($info->getPageCount() !== null && $info->getPageCount() > 0) {
251  $props[] = [
252  "alert" => false,
253  "property" => $DIC->language()->txt("page_count"),
254  "value" => $info->getPageCount(),
255  'propertyNameVisible' => true,
256  ];
257  }
258 
259  return $props;
260  }
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
global $DIC
Definition: feed.php:28
$version
Definition: plugin.php:24
+ Here is the call graph for this function:

◆ getTitle()

ilObjFileListGUI::getTitle ( )

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

155  : string
156  {
157  return $this->file_info->getByObjectId($this->obj_id)->getListTitle();
158  }

◆ init()

ilObjFileListGUI::init ( )

initialisation

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

References ilObjFileAccess\_getCommands(), ilAdvancedMDSubstitution\_getInstanceByObjectType(), ilObjFile\OBJECT_TYPE, and updateContext().

86  : void
87  {
88  $this->delete_enabled = true;
89  $this->cut_enabled = true;
90  $this->copy_enabled = true;
91  $this->subscribe_enabled = true;
92  $this->link_enabled = true;
93  $this->info_screen_enabled = false;
94  $this->type = ilObjFile::OBJECT_TYPE;
95  $this->gui_class_name = ilObjFileGUI::class;
96  $this->icon_repo = new IconDatabaseRepository();
97 
98  $this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
99  if ($this->substitutions->isActive()) {
100  $this->substitutions_enabled = true;
101  }
102 
103  $this->commands = ilObjFileAccess::_getCommands();
104  $this->updateContext();
105  }
const OBJECT_TYPE
static _getCommands()
get commands this method returns an array of all possible commands/permission combinations example: $...
static _getInstanceByObjectType(string $a_type)
+ Here is the call graph for this function:

◆ stripTitleOfFileExtension()

ilObjFileListGUI::stripTitleOfFileExtension ( string  $a_title)

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

160  : string
161  {
162  return $this->secure(preg_replace('/\.[^.]*$/', '', $a_title));
163  }

◆ updateContext()

ilObjFileListGUI::updateContext ( )
protected

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

Referenced by checkCommandAccess(), getCommandFrame(), getCommandLink(), getCommands(), and init().

76  : void
77  {
78  $this->capability_context = $this->capability_context
79  ->withCallingId($this->ref_id ?? 0)
80  ->withObjectId($this->obj_id ?? 0);
81  }
+ Here is the caller graph for this function:

Field Documentation

◆ $capabilities

CapabilityCollection ilObjFileListGUI::$capabilities = null
private

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

◆ $capability_builder

CapabilityBuilder ilObjFileListGUI::$capability_builder
private

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

◆ $capability_context

Context ilObjFileListGUI::$capability_context
private

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

◆ $file_info

ilObjFileInfoRepository ilObjFileListGUI::$file_info
private

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

◆ $icon_repo

IconDatabaseRepository ilObjFileListGUI::$icon_repo
private

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

◆ $irss

Services ilObjFileListGUI::$irss
private

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

◆ $title

string ilObjFileListGUI::$title
protected

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


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