ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjFileUploadDropzone Class Reference
+ Collaboration diagram for ilObjFileUploadDropzone:

Public Member Functions

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

Protected Member Functions

 getUIFactory ()
 
 getLanguage ()
 
 getRefinery ()
 

Protected Attributes

ilObjectDefinition $definition
 
ilCtrlInterface $ctrl
 
UploadHandler $upload_handler
 
ilLanguage $language
 
ilAccess $access
 
UIServices $ui
 
Factory $refinery
 
LOMServices $lom_services
 

Private Member Functions

 isCopyrightSelectionActive ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

45 {
46 global $DIC;
47
48 $this->definition = $DIC['objDefinition'];
49 $this->language = $DIC->language();
50 $this->language->loadLanguageModule('file');
51 $this->access = $DIC->access();
52 $this->ctrl = $DIC->ctrl();
53 $this->ui = $DIC->ui();
54 $this->refinery = $DIC->refinery();
55 $this->lom_services = $DIC->learningObjectMetadata();
56
57 $this->upload_handler = new ilObjFileUploadHandlerGUI();
58 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ILIAS\Repository\refinery(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDropzoneHtml()

ilObjFileUploadDropzone::getDropzoneHtml ( )

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

143 : string
144 {
145 return $this->ui->renderer()->render($this->getDropzone());
146 }

References ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getLanguage()

ilObjFileUploadDropzone::getLanguage ( )
protected

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

154 {
155 return $this->language;
156 }
language handling

References $language.

◆ getRefinery()

ilObjFileUploadDropzone::getRefinery ( )
protected

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

References $refinery.

◆ getUIFactory()

ilObjFileUploadDropzone::getUIFactory ( )
protected

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

149 {
150 return $this->ui->factory();
151 }
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31

References ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ isCopyrightSelectionActive()

ilObjFileUploadDropzone::isCopyrightSelectionActive ( )
private

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

60 : bool
61 {
62 static $active;
63 if ($active === null) {
64 $active = $this->lom_services->copyrightHelper()->isCopyrightSelectionActive();
65 }
66 return $active;
67 }

◆ isUploadAllowed()

ilObjFileUploadDropzone::isUploadAllowed ( string  $obj_type)

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

134 : bool
135 {
136 if ($this->definition->isContainer($obj_type) && $obj_type !== "orgu") {
137 return $this->access->checkAccess('create_file', '', $this->target_ref_id, 'file');
138 }
139
140 return false;
141 }

References ILIAS\Repository\access().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccess ilObjFileUploadDropzone::$access
protected

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

◆ $ctrl

ilCtrlInterface ilObjFileUploadDropzone::$ctrl
protected

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

◆ $definition

ilObjectDefinition ilObjFileUploadDropzone::$definition
protected

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

◆ $language

ilLanguage ilObjFileUploadDropzone::$language
protected

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

Referenced by getLanguage().

◆ $lom_services

LOMServices ilObjFileUploadDropzone::$lom_services
protected

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

◆ $refinery

Factory ilObjFileUploadDropzone::$refinery
protected

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

Referenced by getRefinery().

◆ $ui

UIServices ilObjFileUploadDropzone::$ui
protected

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

◆ $upload_handler

UploadHandler ilObjFileUploadDropzone::$upload_handler
protected

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


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