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

Public Member Functions

 __construct (int $target_ref_id, string $content=null)
 
 isUploadAllowed (string $obj_type)
 
 getDropzoneHtml ()
 

Protected Attributes

ilObjectDefinition $definition
 
ilCtrlInterface $ctrl
 
UploadHandler $upload_handler
 
ilLanguage $language
 
ilAccess $access
 
UIServices $ui
 
int $target_ref_id
 
string $content
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjFileUploadDropzone::__construct ( int  $target_ref_id,
string  $content = null 
)

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

References $content, $DIC, $target_ref_id, ILIAS\Repository\access(), ilObjFileGUI\CMD_UPLOAD_FILES, ILIAS\Repository\ctrl(), ilFileUtils\getUploadSizeLimitBytes(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ilObjFile\OBJECT_TYPE, ilObjFileProcessorInterface\OPTION_DESCRIPTION, ilObjFileProcessorInterface\OPTION_FILENAME, ilObjFileGUI\PARAM_UPLOAD_ORIGIN, ILIAS\Repository\ui(), ilObjFileGUI\UPLOAD_MAX_FILES, and ilObjFileGUI\UPLOAD_ORIGIN_DROPZONE.

41  {
42  global $DIC;
43 
44  $this->definition = $DIC['objDefinition'];
45  $this->language = $DIC->language();
46  $this->access = $DIC->access();
47  $this->ctrl = $DIC->ctrl();
48  $this->ui = $DIC->ui();
49 
50  $this->upload_handler = new ilObjFileUploadHandlerGUI();
51  $this->target_ref_id = $target_ref_id;
52  $this->content = $content;
53  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getDropzoneHtml()

ilObjFileUploadDropzone::getDropzoneHtml ( )

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

References ILIAS\Repository\ui().

119  : string
120  {
121  return $this->ui->renderer()->render($this->getDropzone());
122  }
+ Here is the call graph for this function:

◆ isUploadAllowed()

ilObjFileUploadDropzone::isUploadAllowed ( string  $obj_type)

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

References ILIAS\Repository\access().

110  : bool
111  {
112  if ($this->definition->isContainer($obj_type) && $obj_type !== "orgu") {
113  return $this->access->checkAccess('create_file', '', $this->target_ref_id, 'file');
114  }
115 
116  return false;
117  }
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccess ilObjFileUploadDropzone::$access
protected

Definition at line 34 of file class.ilObjFileUploadDropzone.php.

◆ $content

string ilObjFileUploadDropzone::$content
protected

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

Referenced by __construct().

◆ $ctrl

ilCtrlInterface ilObjFileUploadDropzone::$ctrl
protected

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

◆ $definition

ilObjectDefinition ilObjFileUploadDropzone::$definition
protected

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

◆ $language

ilLanguage ilObjFileUploadDropzone::$language
protected

Definition at line 33 of file class.ilObjFileUploadDropzone.php.

◆ $target_ref_id

int ilObjFileUploadDropzone::$target_ref_id
protected

Definition at line 37 of file class.ilObjFileUploadDropzone.php.

Referenced by __construct().

◆ $ui

UIServices ilObjFileUploadDropzone::$ui
protected

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

◆ $upload_handler

UploadHandler ilObjFileUploadDropzone::$upload_handler
protected

Definition at line 32 of file class.ilObjFileUploadDropzone.php.


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