ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjBibliographicUploadHandlerGUI Class Reference
+ Inheritance diagram for ilObjBibliographicUploadHandlerGUI:
+ Collaboration diagram for ilObjBibliographicUploadHandlerGUI:

Public Member Functions

 __construct (private string $rid="")
 
- Public Member Functions inherited from ilCtrlAwareStorageUploadHandler
 __construct (ResourceStakeholder $stakeholder)
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
- Public Member Functions inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler
 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 getFileIdentifierParameterName ()
 
 getUploadURL ()
 
 getExistingFileInfoURL ()
 
 getFileRemovalURL ()
 
 executeCommand ()
 Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented. More...
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
 supportsChunkedUploads ()
 

Protected Member Functions

 getUploadResult ()
 
- Protected Member Functions inherited from ilCtrlAwareStorageUploadHandler
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 
- Protected Member Functions inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler
 readChunkedInformation ()
 
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 

Additional Inherited Members

- Data Fields inherited from ILIAS\UI\Component\Input\Field\UploadHandler
const DEFAULT_FILE_ID_PARAMETER = 'file_id'
 
- Protected Attributes inherited from ilCtrlAwareStorageUploadHandler
ResourceStakeholder $stakeholder
 
ILIAS ResourceStorage Services $storage
 
- Protected Attributes inherited from ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler
const CMD_UPLOAD = 'upload'
 
const CMD_REMOVE = 'remove'
 
const CMD_INFO = 'info'
 
HttpServices $http
 
ilCtrl $ctrl
 
FileUpload $upload
 
bool $is_chunked = false
 
int $chunk_index = 0
 
int $amount_of_chunks = 0
 
string $chunk_id = null
 
int $chunk_total_size = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjBibliographicUploadHandlerGUI::__construct ( private string  $rid = "")

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

References ILIAS\MetaData\Repository\Validation\Data\__construct().

31  {
33  }
__construct(VocabulariesInterface $vocabularies)
Class ilObjBibliographicStakeholder.
+ Here is the call graph for this function:

Member Function Documentation

◆ getUploadResult()

ilObjBibliographicUploadHandlerGUI::getUploadResult ( )
protected

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

References $message, ILIAS\FileUpload\Handler\AbstractCtrlAwareUploadHandler\getFileIdentifierParameterName(), ILIAS\FileUpload\DTO\UploadResult\isOK(), and ILIAS\Repository\upload().

36  {
37  $this->upload->process();
38 
39  $result_array = $this->upload->getResults();
40  $result = end($result_array);
41 
42  if ($result instanceof UploadResult && $result->isOK()) {
43  $resource_identification = $this->storage->manage()->find($this->rid);
44  if ($resource_identification !== null) {
45  $identifier = $this->storage->manage()->replaceWithUpload(
46  $resource_identification,
47  $result,
48  $this->stakeholder
49  )->getIdentification()->serialize();
50  } else {
51  $identifier = $this->storage->manage()->upload($result, $this->stakeholder)->serialize();
52  }
53  $status = HandlerResult::STATUS_OK;
54  $message = "file upload OK";
55  } else {
56  $identifier = '';
57  $status = HandlerResult::STATUS_FAILED;
58  $message = $result->getStatus()->getMessage();
59  }
60 
61  return new BasicHandlerResult(
63  $status,
64  $identifier,
65  $message
66  );
67  }
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:

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