ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjectPropertiesUploadSecurityFunctionsTrait.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
25  protected function getAccess(
26  int $ref_id,
27  ilAccessHandler $access
28  ): bool {
29  if ($ref_id !== null
30  && $access->checkAccess('write', '', $ref_id)) {
31  return true;
32  }
33 
34  return false;
35  }
36 
37  protected function getAccessFailureResult(
38  string $file_identification_parameter_name,
39  string $file_name,
40  ilLanguage $language
41  ): HandlerResult {
42  $language->loadLanguageModule('content');
43  return new BasicHandlerResult(
44  $file_identification_parameter_name,
45  HandlerResult::STATUS_FAILED,
46  basename($file_name),
47  $language->txt('cont_no_access')
48  );
49  }
50 }
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...
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) ...
loadLanguageModule(string $a_module)
Load language module.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65