ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjFile Class Reference

Class ilObjFile. More...

+ Inheritance diagram for ilObjFile:
+ Collaboration diagram for ilObjFile:

Public Member Functions

 __construct (int $a_id=0, bool $a_call_by_reference=true)
 ilObjFile constructor. More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 updateObjectFromCurrentRevision ()
 
 appendSuffixToTitle (string $title, string $filename)
 
 appendStream (FileStream $stream, string $title)
 
 appendUpload (UploadResult $result, string $title)
 
 replaceWithStream (FileStream $stream, string $title)
 
 replaceWithUpload (UploadResult $result, string $title)
 
 getFile (?int $a_hist_entry_id=null)
 
 getDirectory ($a_version=0)
 
 getDownloadFilename ()
 
 getImportantInfo ()
 
 setImportantInfo (string $a_important_info)
 
 getVersion (bool $inclduing_drafts=false)
 
 setVersion (int $a_version)
 
 getFileName ()
 
 setFileName (string $a_name)
 
 setRating (bool $a_value)
 
 setResourceId (?string $resource_id)
 
 getResourceId ()
 
 getStorageID ()
 
 getMode ()
 
 setMode (string $a_mode)
 
 getFileSize ()
 
 setFileSize (int $a_size)
 
 getFileType ()
 
 setFileType (string $a_type)
 
 hasRating ()
 
 getMaxVersion ()
 
 setMaxVersion (int $a_max_version)
 
 getCopyrightID ()
 
 setCopyrightID (?string $copyright_id)
 
 getPageCount ()
 
 setPageCount (int $page_count)
 
 getAction ()
 
 directDownload ()
 
 getOnClickMode ()
 
 setOnclickMode (int $on_click_mode)
 
 getAmountOfDownloads ()
 
 setAmountOfDownloads (int $amount)
 
 getLPMode ()
 
 setAction (string $a_action)
 
 handleChangedObjectTitle (string $new_title)
 
 replaceFile ($a_upload_file, $a_filename)
 
 getUploadFile ($a_upload_file, string $title, bool $a_prevent_preview=false)
 @description This Method is used to append a fileupload by it's POST-name to the current ilObjFile More...
 
 isHidden ()
 
 clearDataDirectory ()
 @ineritdoc More...
 
 deleteVersions ($a_hist_entry_ids=null)
 @ineritdoc More...
 
 sendFile (?int $a_hist_entry_id=null, bool $inline=true)
 
 export (string $a_target_dir)
 
 getVersions ($version_ids=null)
 
 rollback (int $version_id)
 Makes the specified version the current one. More...
 
 checkFileExtension (string $new_filename, string $new_title)
 
 getFileExtension ()
 Returns the extension of the file name converted to lower-case. More...
 
 stripTitleOfFileExtension (string $a_title)
 
- Public Member Functions inherited from ilObject2
 __construct (int $a_id=0, bool $a_reference=true)
 Constructor. More...
 
 read ()
 
 create (bool $a_clone_mode=false)
 
 update ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 cloneObject (int $target_id, int $copy_id=0, bool $omit_tree=false)
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id, int $new_obj_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 
- Public Member Functions inherited from ilObjFileImplementationInterface
 getDirectory (int $a_version=0)
 
 deleteVersions (?array $a_hist_entry_ids=null)
 Deletes the specified history entries or all entries if no ids are specified. More...
 
 getFileType ()
 
 getStorageID ()
 
 getFileSize ()
 
 getFileName ()
 
 getFile (?int $a_hist_entry_id=null)
 
 getVersion (bool $inclduing_drafts=false)
 
 getMaxVersion ()
 
 sendFile (?int $a_hist_entry_id=null, bool $inline=true)
 
 handleChangedObjectTitle (string $new_title)
 
 getFileExtension ()
 Returns the extension of the file name converted to lower-case. More...
 
 getVersions (?array $version_ids=null)
 Gets the file versions for this object. More...
 

Data Fields

const MODE_FILELIST = "filelist"
 
const MODE_OBJECT = "object"
 
const OBJECT_TYPE = "file"
 
const CLICK_MODE_DOWNLOAD = 1
 
const CLICK_MODE_INFOPAGE = 2
 
string $mode = self::MODE_OBJECT
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Protected Member Functions

 initFileInfo (int $id, bool $is_ref_id)
 
 initImplementation ()
 
 doCreate (bool $clone_mode=false)
 
 doRead ()
 
 doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=0)
 
 doUpdate ()
 
 beforeUpdate ()
 
 beforeDelete ()
 
 doDelete ()
 
 initType ()
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate (bool $clone_mode=false)
 
 beforeCreate ()
 If overwritten this method should return true, there is currently no "abort" handling for cases where "false" is returned. More...
 
 doUpdate ()
 
 beforeUpdate ()
 
 doDelete ()
 
 beforeDelete ()
 
 doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
 
 beforeCloneObject ()
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Protected Attributes

ilObjFileInfo $file_info
 
ilObjFileImplementationInterface $implementation
 
string $important_info = null
 
int $page_count = 0
 
bool $rating = false
 
ilLogger $log
 
string $filename = ''
 
string $filetype = ''
 
int $filesize
 
int $version = 0
 
int $max_version = 0
 
string $copyright_id = null
 
string $action = ''
 
string $resource_id = null
 
Manager $manager
 
FileUpload $upload
 
ilObjFileStakeholder $stakeholder
 
int $on_click_mode = self::CLICK_MODE_DOWNLOAD
 
int $amount_of_downloads = 0
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Private Member Functions

 updateObjectFromRevision (Revision $r)
 
 getArrayForDatabase ()
 
 prepareUpload ()
 

Private Attributes

ilDBInterface $database
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

Detailed Description

Class ilObjFile.

Author
Sascha Hofmann shofm.nosp@m.ann@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
$Id$ \

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

Constructor & Destructor Documentation

◆ __construct()

ilObjFile::__construct ( int  $a_id = 0,
bool  $a_call_by_reference = true 
)

ilObjFile constructor.

Parameters
int$a_idID of the object, ref_id or obj_id possible
bool$a_call_by_referencedefines the $a_id a ref_id

Reimplemented from ilObject2.

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

77 {
78 global $DIC;
79 $this->manager = $DIC->resourceStorage()->manage();
80 $this->database = $DIC->database();
81 $this->implementation = new ilObjFileImplementationEmpty();
82 $this->stakeholder = new ilObjFileStakeholder($DIC->user()->getId());
83 $this->upload = $DIC->upload();
84 $this->log = ilLoggerFactory::getLogger(self::OBJECT_TYPE);
85
86 parent::__construct($a_id, $a_call_by_reference);
87 $this->initFileInfo($a_id, $a_call_by_reference);
88 }
static getLogger(string $a_component_id)
Get component logger.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjFileStakeholder.
initFileInfo(int $id, bool $is_ref_id)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\database(), ilLoggerFactory\getLogger(), initFileInfo(), and ILIAS\Repository\upload().

+ Here is the call graph for this function:

Member Function Documentation

◆ appendStream()

ilObjFile::appendStream ( FileStream  $stream,
string  $title 
)
Exceptions
FileNamePolicyException

Definition at line 149 of file class.ilObjFile.php.

149 : int
150 {
151 $title = $this->ensureSuffix(
152 $title,
154 ?? pathinfo($stream->getMetadata('uri'))['extension']
155 ?? null
156 );
157 if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
158 $revision = $this->manager->appendNewRevisionFromStream($i, $stream, $this->stakeholder, $title);
159 } else {
160 $i = $this->manager->stream($stream, $this->stakeholder, $title);
161 $revision = $this->manager->getCurrentRevision($i);
162 $this->setResourceId($i->serialize());
163 $this->initImplementation();
164 }
165 $this->enableNotification();
166 $this->updateObjectFromRevision($revision);
167
168 return $revision->getVersionNumber();
169 }
setResourceId(?string $resource_id)
updateObjectFromRevision(Revision $r)
string $title
enableNotification()
ensureSuffix(string $title, ?string $suffix=null)
extractSuffixFromFilename(string $filename)

References ilObject\$title, enableNotification(), ensureSuffix(), extractSuffixFromFilename(), getResourceId(), initImplementation(), setResourceId(), and updateObjectFromRevision().

+ Here is the call graph for this function:

◆ appendSuffixToTitle()

ilObjFile::appendSuffixToTitle ( string  $title,
string  $filename 
)

Definition at line 135 of file class.ilObjFile.php.

135 : string
136 {
137 $suffix = $this->file_info->getSuffix();
138 $filename_suffix = $this->extractSuffixFromFilename($filename);
139 if (empty($suffix) || $suffix !== $filename_suffix) {
140 $suffix = $filename_suffix;
141 }
142
143 return $this->ensureSuffix($title, $suffix);
144 }
string $filename

References ensureSuffix(), and extractSuffixFromFilename().

Referenced by appendUpload(), checkFileExtension(), and replaceWithUpload().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ appendUpload()

ilObjFile::appendUpload ( UploadResult  $result,
string  $title 
)
Exceptions
FileNamePolicyException

Definition at line 174 of file class.ilObjFile.php.

174 : int
175 {
176 $title = $this->appendSuffixToTitle($title, $result->getName());
177 if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
178 $revision = $this->manager->appendNewRevision($i, $result, $this->stakeholder, $title);
179 } else {
180 $i = $this->manager->upload($result, $this->stakeholder, $title);
181 $revision = $this->manager->getCurrentRevision($i);
182 $this->setResourceId($i->serialize());
183 $this->initImplementation();
184 }
187 }
188 $this->enableNotification();
189 $this->updateObjectFromRevision($revision);
190
191 return $revision->getVersionNumber();
192 }
appendSuffixToTitle(string $title, string $filename)
setPageCount(int $page_count)

References ilObject\$title, appendSuffixToTitle(), enableNotification(), ILIAS\FileUpload\DTO\UploadResult\getMetaData(), ILIAS\FileUpload\DTO\UploadResult\getName(), getResourceId(), initImplementation(), ilCountPDFPagesPreProcessors\PAGE_COUNT, setPageCount(), setResourceId(), and updateObjectFromRevision().

Referenced by getUploadFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ beforeDelete()

ilObjFile::beforeDelete ( )
protected

Reimplemented from ilObject2.

Definition at line 533 of file class.ilObjFile.php.

533 : bool
534 {
535 // check, if file is used somewhere
536 $usages = $this->getUsages();
537 return $usages === [];
538 }

◆ beforeUpdate()

ilObjFile::beforeUpdate ( )
protected

Reimplemented from ilObject2.

Definition at line 515 of file class.ilObjFile.php.

515 : bool
516 {
517 $suffix = $this->file_info->getSuffix();
518 if (empty($suffix)) {
519 $suffix = $this->extractSuffixFromFilename($this->getTitle());
520 }
521 $this->setTitle($this->ensureSuffix($this->getTitle(), $suffix));
522
523 // no meta data handling for file list files
524 if ($this->getMode() !== self::MODE_FILELIST) {
525 $this->updateMetaData();
526 $this->updateCopyright();
527 }
528
529 return true;
530 }
setTitle(string $title)

References ensureSuffix(), extractSuffixFromFilename(), getMode(), ilObject\getTitle(), ilObject\setTitle(), updateCopyright(), and ilObject\updateMetaData().

+ Here is the call graph for this function:

◆ checkFileExtension()

ilObjFile::checkFileExtension ( string  $new_filename,
string  $new_title 
)
Deprecated:

Definition at line 699 of file class.ilObjFile.php.

699 : string
700 {
701 return $this->appendSuffixToTitle($new_title, $new_filename);
702 }

References appendSuffixToTitle().

+ Here is the call graph for this function:

◆ clearDataDirectory()

ilObjFile::clearDataDirectory ( )

@ineritdoc

Deprecated:

Definition at line 636 of file class.ilObjFile.php.

636 : void
637 {
638 $this->implementation->clearDataDirectory();
639 }

◆ deleteVersions()

ilObjFile::deleteVersions (   $a_hist_entry_ids = null)

@ineritdoc

Deprecated:

Definition at line 645 of file class.ilObjFile.php.

645 : void
646 {
647 $this->implementation->deleteVersions($a_hist_entry_ids);
648 // update file object as the deletion of versions might affect its attributes (title, max_version etc.)
649 if ($this->getResourceId() && $rid = $this->manager->find($this->getResourceId())) {
650 $latest_revision = $this->manager->getCurrentRevision($rid);
651 $this->updateObjectFromRevision($latest_revision);
652 }
653 }

References getResourceId(), and updateObjectFromRevision().

+ Here is the call graph for this function:

◆ directDownload()

ilObjFile::directDownload ( )

Definition at line 385 of file class.ilObjFile.php.

385 : bool
386 {
387 return $this->on_click_mode === self::CLICK_MODE_DOWNLOAD;
388 }
const CLICK_MODE_DOWNLOAD

References CLICK_MODE_DOWNLOAD.

◆ doCloneObject()

ilObjFile::doCloneObject ( ilObject2  $new_obj,
int  $a_target_id,
?int  $a_copy_id = 0 
)
protected

Reimplemented from ilObject2.

Definition at line 466 of file class.ilObjFile.php.

466 : void
467 {
468 assert($new_obj instanceof ilObjFile);
469 $identification = $this->manager->find($this->resource_id);
470 if ($identification === null) {
471 throw new RuntimeException('Cannot clone file since no corresponding resource identification was found');
472 }
473
474 $this->cloneMetaData($new_obj);
475 // object created now copy other settings
476 $new_obj->updateFileData();
477
478 // Copy Resource
479 $cloned_title = $new_obj->getTitle();
480 $new_resource_identification = $this->manager->clone($identification);
481 $new_current_revision = $this->manager->getCurrentRevision($new_resource_identification);
482 $new_obj->setResourceId($new_resource_identification->serialize());
483 $new_obj->initImplementation();
484 $new_obj->updateObjectFromRevision($new_current_revision); // Previews are already copied in 453
485 $new_obj->setTitle($cloned_title); // see https://mantis.ilias.de/view.php?id=31375
486 $new_obj->setPageCount($this->getPageCount());
487 $new_obj->setImportantInfo($this->getImportantInfo());
488 $new_obj->setRating($this->hasRating());
489 $new_obj->setOnclickMode($this->getOnClickMode());
490 $new_obj->update();
491
492 $new_obj->getObjectProperties()->storePropertyIsOnline(new Online(true));
493
494 // Copy learning progress settings
495 $obj_settings = new ilLPObjSettings($this->getId());
496 $obj_settings->cloneSettings($new_obj->getId());
497 unset($obj_settings);
498 }
Class ilObjFile.
cloneMetaData(ilObject $target_obj)
Copy meta data.

References ilObject2\cloneMetaData(), ilObject\getId(), getImportantInfo(), ilObject\getObjectProperties(), getOnClickMode(), getPageCount(), ilObject\getTitle(), hasRating(), ilObject\setTitle(), and ilObject2\update().

+ Here is the call graph for this function:

◆ doCreate()

ilObjFile::doCreate ( bool  $clone_mode = false)
protected

Reimplemented from ilObject2.

Definition at line 436 of file class.ilObjFile.php.

436 : void
437 {
438 $this->createProperties(true);
439 $this->updateCopyright();
440 $this->getObjectProperties()->storePropertyIsOnline(new Online(true));
441 $this->notifyCreation($this->getId(), $this->getDescription());
442 }
createProperties(bool $a_upload=false)
The basic properties of a file object are stored in table object_data.
notifyCreation(int $obj_id, ?string $additional_message=null)

References createProperties(), ilObject\getDescription(), ilObject\getId(), ilObject\getObjectProperties(), notifyCreation(), and updateCopyright().

+ Here is the call graph for this function:

◆ doDelete()

ilObjFile::doDelete ( )
protected

Reimplemented from ilObject2.

Definition at line 540 of file class.ilObjFile.php.

540 : void
541 {
542 // delete file data entry
543 $this->database->manipulateF("DELETE FROM file_data WHERE file_id = %s", ['integer'], [$this->getId()]);
544
545 // delete history entries
547
548 // delete meta data
549 if ($this->getMode() !== self::MODE_FILELIST) {
550 $this->deleteMetaData();
551 }
552
553 // delete resource
554 $identification = $this->getResourceId();
555 if ($identification && $identification !== '-') {
556 $resource = $this->manager->find($identification);
557 if ($resource !== null) {
558 $this->manager->remove($resource, $this->stakeholder);
559 }
560 }
561 }
static _removeEntriesForObject(int $a_obj_id)
remove all history entries for an object

References ilHistory\_removeEntriesForObject(), ILIAS\Repository\database(), ilObject\deleteMetaData(), ilObject\getId(), getMode(), and getResourceId().

+ Here is the call graph for this function:

◆ doRead()

ilObjFile::doRead ( )
protected

Reimplemented from ilObject2.

Definition at line 444 of file class.ilObjFile.php.

444 : void
445 {
446 $q = "SELECT * FROM file_data WHERE file_id = %s";
447 $r = $this->database->queryF($q, ['integer'], [$this->getId()]);
448 $row = $r->fetchObject();
449
450 $this->filename = $this->secure($row->file_name ?? '');
451 $this->filetype = $row->file_type ?? '';
452 $this->filesize = $row->file_size ?? 0;
453 $this->version = $row->version ?? 1;
454 $this->max_version = $row->max_version ?? 1;
455 $this->mode = $row->f_mode ?? self::MODE_OBJECT;
456 $this->important_info = $row->important_info ?? "";
457 $this->rating = (bool) ($row->rating ?? false);
458 $this->page_count = (int) ($row->page_count ?? 0);
459 $this->resource_id = $row->rid ?? null;
460 $this->on_click_mode = (int) ($row->on_click_mode ?? self::CLICK_MODE_DOWNLOAD);
461 $this->amount_of_downloads = (int) ($row->downloads ?? 0);
462
463 $this->initImplementation();
464 }
const MODE_OBJECT
$q
Definition: shib_logout.php:23

References $q, ILIAS\Repository\database(), ilObject\getId(), initImplementation(), ILIAS\Repository\int(), and MODE_OBJECT.

+ Here is the call graph for this function:

◆ doUpdate()

ilObjFile::doUpdate ( )
protected

Reimplemented from ilObject2.

Definition at line 500 of file class.ilObjFile.php.

500 : void
501 {
502 $a_columns = $this->getArrayForDatabase();
503 $this->database->update('file_data', $a_columns, [
504 'file_id' => [
505 'integer',
506 $this->getId(),
507 ],
508 ]);
509
510 $this->notifyUpdate($this->getId(), $this->getDescription());
511 $this->initImplementation();
512 }
notifyUpdate(int $obj_id, ?string $additional_message=null)

References ILIAS\Repository\database(), getArrayForDatabase(), ilObject\getDescription(), ilObject\getId(), initImplementation(), and notifyUpdate().

+ Here is the call graph for this function:

◆ export()

ilObjFile::export ( string  $a_target_dir)
Deprecated:
no longer available since it's unclear/unspecified how to export

Definition at line 667 of file class.ilObjFile.php.

667 : void
668 {
669 //
670 }

◆ getAction()

ilObjFile::getAction ( )
Deprecated:

Definition at line 380 of file class.ilObjFile.php.

380 : string
381 {
382 return $this->action;
383 }
string $action

References $action.

◆ getAmountOfDownloads()

ilObjFile::getAmountOfDownloads ( )

Definition at line 400 of file class.ilObjFile.php.

400 : int
401 {
403 }
int $amount_of_downloads

References $amount_of_downloads.

Referenced by getArrayForDatabase(), and sendFile().

+ Here is the caller graph for this function:

◆ getArrayForDatabase()

ilObjFile::getArrayForDatabase ( )
private
Returns
array{file_id: int[]|string[], file_name: string[], f_mode: string[], important_info: string[]|null[], page_count: int[]|string[], rating: bool[]|string[], rid: string[], on_click_mode: int[]|string[], downloads: int[]|string[]}

Definition at line 566 of file class.ilObjFile.php.

566 : array
567 {
568 return [
569 'file_id' => ['integer', $this->getId()],
570 'file_name' => ['text', $this->getFileName()],
571 'f_mode' => ['text', $this->getMode()],
572 'important_info' => ['text', $this->getImportantInfo()],
573 'page_count' => ['text', $this->getPageCount()],
574 'rating' => ['integer', $this->hasRating()],
575 'rid' => ['text', $this->resource_id ?? ''],
576 'on_click_mode' => ['integer', $this->getOnClickMode()],
577 'downloads' => ['integer', $this->getAmountOfDownloads()],
578 ];
579 }

References getAmountOfDownloads(), getFileName(), ilObject\getId(), getImportantInfo(), getMode(), getOnClickMode(), getPageCount(), and hasRating().

Referenced by doUpdate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopyrightID()

ilObjFile::getCopyrightID ( )

Definition at line 357 of file class.ilObjFile.php.

357 : ?string
358 {
359 return $this->copyright_id;
360 }
string $copyright_id

References $copyright_id.

◆ getDirectory()

ilObjFile::getDirectory (   $a_version = 0)

Definition at line 239 of file class.ilObjFile.php.

239 : string
240 {
241 return $this->implementation->getDirectory($a_version);
242 }

◆ getDownloadFilename()

ilObjFile::getDownloadFilename ( )

Definition at line 244 of file class.ilObjFile.php.

244 : string
245 {
246 return $this->implementation->getDownloadFilename();
247 }

◆ getFile()

ilObjFile::getFile ( ?int  $a_hist_entry_id = null)
Deprecated:

Implements ilObjFileImplementationInterface.

Definition at line 233 of file class.ilObjFile.php.

233 : string
234 {
235 $this->initImplementation();
236 return $this->implementation->getFile($a_hist_entry_id);
237 }

References initImplementation().

+ Here is the call graph for this function:

◆ getFileExtension()

ilObjFile::getFileExtension ( )

Returns the extension of the file name converted to lower-case.

e.g. returns 'pdf' for 'document.pdf'.

Implements ilObjFileImplementationInterface.

Definition at line 704 of file class.ilObjFile.php.

704 : string
705 {
706 return $this->implementation->getFileExtension();
707 }

◆ getFileName()

ilObjFile::getFileName ( )

Implements ilObjFileImplementationInterface.

Definition at line 269 of file class.ilObjFile.php.

269 : string
270 {
271 return $this->implementation->getFileName();
272 }

Referenced by getArrayForDatabase().

+ Here is the caller graph for this function:

◆ getFileSize()

ilObjFile::getFileSize ( )

Implements ilObjFileImplementationInterface.

Definition at line 313 of file class.ilObjFile.php.

313 : int
314 {
315 return $this->implementation->getFileSize();
316 }

◆ getFileType()

ilObjFile::getFileType ( )

Implements ilObjFileImplementationInterface.

Definition at line 326 of file class.ilObjFile.php.

326 : string
327 {
328 return $this->implementation->getFileType();
329 }

◆ getImportantInfo()

ilObjFile::getImportantInfo ( )

Definition at line 249 of file class.ilObjFile.php.

249 : ?string
250 {
252 }
string $important_info

References $important_info.

Referenced by doCloneObject(), and getArrayForDatabase().

+ Here is the caller graph for this function:

◆ getLPMode()

ilObjFile::getLPMode ( )

Definition at line 414 of file class.ilObjFile.php.

414 : int
415 {
416 return ilObjectLP::getInstance($this->getId())->getCurrentMode();
417 }
static getInstance(int $obj_id)

References ilObject\getId(), and ilObjectLP\getInstance().

+ Here is the call graph for this function:

◆ getMaxVersion()

ilObjFile::getMaxVersion ( )

Implements ilObjFileImplementationInterface.

Definition at line 344 of file class.ilObjFile.php.

344 : int
345 {
346 return $this->max_version;
347 }

References $max_version.

◆ getMode()

ilObjFile::getMode ( )

Definition at line 300 of file class.ilObjFile.php.

300 : string
301 {
302 return $this->mode;
303 }

References $mode.

Referenced by beforeUpdate(), doDelete(), and getArrayForDatabase().

+ Here is the caller graph for this function:

◆ getOnClickMode()

ilObjFile::getOnClickMode ( )

Definition at line 390 of file class.ilObjFile.php.

390 : int
391 {
393 }

References $on_click_mode.

Referenced by doCloneObject(), and getArrayForDatabase().

+ Here is the caller graph for this function:

◆ getPageCount()

ilObjFile::getPageCount ( )

Definition at line 367 of file class.ilObjFile.php.

367 : int
368 {
369 return $this->page_count;
370 }

References $page_count.

Referenced by doCloneObject(), and getArrayForDatabase().

+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilObjFile::getPresentationTitle ( )

get presentation title Normally same as title Overwritten for sessions

Reimplemented from ilObject.

Definition at line 97 of file class.ilObjFile.php.

97 : string
98 {
99 return $this->file_info->getHeaderTitle();
100 }

◆ getResourceId()

ilObjFile::getResourceId ( )

Definition at line 290 of file class.ilObjFile.php.

290 : string
291 {
292 return $this->resource_id ?? '-';
293 }

Referenced by appendStream(), appendUpload(), deleteVersions(), doDelete(), replaceWithStream(), replaceWithUpload(), and rollback().

+ Here is the caller graph for this function:

◆ getStorageID()

ilObjFile::getStorageID ( )

Implements ilObjFileImplementationInterface.

Definition at line 295 of file class.ilObjFile.php.

295 : ?string
296 {
297 return $this->implementation->getStorageID();
298 }

◆ getUploadFile()

ilObjFile::getUploadFile (   $a_upload_file,
string  $title,
bool  $a_prevent_preview = false 
)

@description This Method is used to append a fileupload by it's POST-name to the current ilObjFile

Deprecated:
See also
appendUpload(), appendStream()

Definition at line 612 of file class.ilObjFile.php.

612 : bool
613 {
614 $this->prepareUpload();
615
616 $results = $this->upload->getResults();
617 $upload = $results[$a_upload_file];
618
619 $this->appendUpload($upload, $title);
620
621 return true;
622 }
FileUpload $upload
appendUpload(UploadResult $result, string $title)
$results

References $results, ilObject\$title, appendUpload(), prepareUpload(), and ILIAS\Repository\upload().

+ Here is the call graph for this function:

◆ getVersion()

ilObjFile::getVersion ( bool  $inclduing_drafts = false)

Implements ilObjFileImplementationInterface.

Definition at line 259 of file class.ilObjFile.php.

259 : int
260 {
261 return $this->implementation->getVersion($inclduing_drafts);
262 }

◆ getVersions()

ilObjFile::getVersions (   $version_ids = null)
Parameters
null$version_ids
Returns
array|ilObjFileVersion[]

Definition at line 676 of file class.ilObjFile.php.

676 : array
677 {
678 return $this->implementation->getVersions($version_ids);
679 }

◆ handleChangedObjectTitle()

ilObjFile::handleChangedObjectTitle ( string  $new_title)

Implements ilObjFileImplementationInterface.

Definition at line 429 of file class.ilObjFile.php.

429 : void
430 {
431 $new_title = $this->ensureSuffix($new_title, $this->file_info->getSuffix());
432 $this->setTitle($new_title);
433 $this->implementation->handleChangedObjectTitle($new_title);
434 }

References ensureSuffix(), and ilObject\setTitle().

+ Here is the call graph for this function:

◆ hasRating()

ilObjFile::hasRating ( )

Definition at line 339 of file class.ilObjFile.php.

339 : bool
340 {
341 return $this->rating;
342 }

References $rating.

Referenced by doCloneObject(), and getArrayForDatabase().

+ Here is the caller graph for this function:

◆ initFileInfo()

ilObjFile::initFileInfo ( int  $id,
bool  $is_ref_id 
)
protected

Definition at line 90 of file class.ilObjFile.php.

90 : void
91 {
92 $repository = new ilObjFileInfoRepository();
93 $this->file_info = $is_ref_id ? $repository->getByRefId($id) : $repository->getByObjectId($id);
94 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id.

Referenced by __construct(), initImplementation(), and updateObjectFromRevision().

+ Here is the caller graph for this function:

◆ initImplementation()

ilObjFile::initImplementation ( )
protected

Definition at line 102 of file class.ilObjFile.php.

102 : void
103 {
104 if ($this->resource_id && ($id = $this->manager->find(
105 $this->resource_id
106 )) instanceof ResourceIdentification) {
107 $resource = $this->manager->getResource($id);
108 $this->implementation = new ilObjFileImplementationStorage($resource);
109 $this->max_version = $resource->getMaxRevision(false);
110 $this->version = $resource->getCurrentRevision()->getVersionNumber();
111 }
112 $this->initFileInfo($this->getId(), false);
113 }
Class ilObjFileImplementationStorage.

References $id, ilObject\getId(), and initFileInfo().

Referenced by appendStream(), appendUpload(), doRead(), doUpdate(), and getFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initType()

ilObjFile::initType ( )
protected

Reimplemented from ilObject2.

Definition at line 581 of file class.ilObjFile.php.

581 : void
582 {
583 $this->type = self::OBJECT_TYPE;
584 }
const OBJECT_TYPE

References OBJECT_TYPE.

◆ isHidden()

ilObjFile::isHidden ( )
Deprecated:

Definition at line 627 of file class.ilObjFile.php.

627 : bool
628 {
630 }
static _isFileHidden(string $a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user.

References ilObjFileAccess\_isFileHidden(), and ilObject\getTitle().

+ Here is the call graph for this function:

◆ prepareUpload()

ilObjFile::prepareUpload ( )
private

Definition at line 596 of file class.ilObjFile.php.

596 : void
597 {
598 if (!$this->upload->hasBeenProcessed()) {
599 if (defined('PATH_TO_GHOSTSCRIPT') && PATH_TO_GHOSTSCRIPT !== "") {
600 $this->upload->register(new ilCountPDFPagesPreProcessors());
601 }
602
603 $this->upload->process();
604 }
605 }
Class ilCountPDFPagesPreProcessors.

References ILIAS\Repository\upload().

Referenced by getUploadFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceFile()

ilObjFile::replaceFile (   $a_upload_file,
  $a_filename 
)
Returns
null

Definition at line 591 of file class.ilObjFile.php.

591 : null
592 {
593 return null;
594 }

◆ replaceWithStream()

ilObjFile::replaceWithStream ( FileStream  $stream,
string  $title 
)
Exceptions
FileNamePolicyException

Definition at line 197 of file class.ilObjFile.php.

197 : int
198 {
199 if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
200 $revision = $this->manager->replaceWithStream($i, $stream, $this->stakeholder, $title);
201 } else {
202 throw new LogicException('only files with existing resource and revision can be replaced');
203 }
204 $this->enableNotification();
205 $this->updateObjectFromRevision($revision);
206
207 return $revision->getVersionNumber();
208 }

References ilObject\$title, enableNotification(), getResourceId(), and updateObjectFromRevision().

+ Here is the call graph for this function:

◆ replaceWithUpload()

ilObjFile::replaceWithUpload ( UploadResult  $result,
string  $title 
)
Exceptions
FileNamePolicyException

Definition at line 213 of file class.ilObjFile.php.

213 : int
214 {
215 $title = $this->appendSuffixToTitle($title, $result->getName());
216 if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
217 $revision = $this->manager->replaceWithUpload($i, $result, $this->stakeholder, $title);
218 } else {
219 throw new LogicException('only files with existing resource and revision can be replaced');
220 }
223 }
224 $this->enableNotification();
225 $this->updateObjectFromRevision($revision);
226
227 return $revision->getVersionNumber();
228 }

References ilObject\$title, appendSuffixToTitle(), enableNotification(), ILIAS\FileUpload\DTO\UploadResult\getMetaData(), ILIAS\FileUpload\DTO\UploadResult\getName(), getResourceId(), ilCountPDFPagesPreProcessors\PAGE_COUNT, setPageCount(), and updateObjectFromRevision().

+ Here is the call graph for this function:

◆ rollback()

ilObjFile::rollback ( int  $version_id)

Makes the specified version the current one.

Parameters
int$version_idThe id of the version to make the current one.

Definition at line 685 of file class.ilObjFile.php.

685 : void
686 {
687 if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
688 $this->manager->rollbackRevision($i, $version_id);
689 $latest_revision = $this->manager->getCurrentRevision($i);
690 $this->updateObjectFromRevision($latest_revision);
691 } else {
692 throw new LogicException('only files with existing resource and revision can be replaced');
693 }
694 }

References getResourceId(), and updateObjectFromRevision().

+ Here is the call graph for this function:

◆ sendFile()

ilObjFile::sendFile ( ?int  $a_hist_entry_id = null,
bool  $inline = true 
)
Parameters
bool$inline
Deprecated:

Implements ilObjFileImplementationInterface.

Definition at line 655 of file class.ilObjFile.php.

655 : void
656 {
657 // increment file download count by one.
658 $this->setAmountOfDownloads($this->getAmountOfDownloads() + 1);
659 $this->update();
660 $info = (new ilObjFileInfoRepository())->getByObjectId($this->getId());
661 $this->implementation->sendFile($a_hist_entry_id, $info->shouldDeliverInline());
662 }
setAmountOfDownloads(int $amount)
$info
Definition: entry_point.php:21

References $info, getAmountOfDownloads(), ilObject\getId(), setAmountOfDownloads(), and ilObject2\update().

+ Here is the call graph for this function:

◆ setAction()

ilObjFile::setAction ( string  $a_action)
Parameters
$a_action
Returns
never
Deprecated:

Definition at line 424 of file class.ilObjFile.php.

424 : void
425 {
426 throw new LogicException('cannot change action');
427 }

◆ setAmountOfDownloads()

ilObjFile::setAmountOfDownloads ( int  $amount)

Definition at line 405 of file class.ilObjFile.php.

405 : void
406 {
407 if (0 > $amount) {
408 throw new LogicException("Amount cannot be a negative number.");
409 }
410
411 $this->amount_of_downloads = $amount;
412 }

Referenced by sendFile().

+ Here is the caller graph for this function:

◆ setCopyrightID()

ilObjFile::setCopyrightID ( ?string  $copyright_id)

Definition at line 362 of file class.ilObjFile.php.

362 : void
363 {
364 $this->copyright_id = $copyright_id;
365 }

References $copyright_id.

◆ setFileName()

ilObjFile::setFileName ( string  $a_name)

Definition at line 274 of file class.ilObjFile.php.

274 : void
275 {
276 $this->filename = $a_name;
277 }

Referenced by updateObjectFromRevision().

+ Here is the caller graph for this function:

◆ setFileSize()

ilObjFile::setFileSize ( int  $a_size)
Returns
never

Definition at line 321 of file class.ilObjFile.php.

321 : void
322 {
323 throw new LogicException('cannot change filesize');
324 }

◆ setFileType()

ilObjFile::setFileType ( string  $a_type)
Returns
never

Definition at line 334 of file class.ilObjFile.php.

334 : void
335 {
336 throw new LogicException('cannot change filetype');
337 }

◆ setImportantInfo()

ilObjFile::setImportantInfo ( string  $a_important_info)

Definition at line 254 of file class.ilObjFile.php.

254 : void
255 {
256 $this->important_info = empty($a_important_info) ? null : $a_important_info;
257 }

◆ setMaxVersion()

ilObjFile::setMaxVersion ( int  $a_max_version)
Returns
never

Definition at line 352 of file class.ilObjFile.php.

352 : void
353 {
354 throw new LogicException('cannot change max-version');
355 }

◆ setMode()

ilObjFile::setMode ( string  $a_mode)
Parameters
string$a_modeself::MODE_FILELIST or self::MODE_OBJECT

Definition at line 308 of file class.ilObjFile.php.

308 : void
309 {
310 $this->mode = $a_mode;
311 }

◆ setOnclickMode()

ilObjFile::setOnclickMode ( int  $on_click_mode)

Definition at line 395 of file class.ilObjFile.php.

395 : void
396 {
397 $this->on_click_mode = $on_click_mode;
398 }

References $on_click_mode.

◆ setPageCount()

ilObjFile::setPageCount ( int  $page_count)

Definition at line 372 of file class.ilObjFile.php.

372 : void
373 {
374 $this->page_count = $page_count;
375 }

References $page_count.

Referenced by appendUpload(), and replaceWithUpload().

+ Here is the caller graph for this function:

◆ setRating()

ilObjFile::setRating ( bool  $a_value)

Definition at line 279 of file class.ilObjFile.php.

279 : void
280 {
281 $this->rating = $a_value;
282 }

◆ setResourceId()

ilObjFile::setResourceId ( ?string  $resource_id)

Definition at line 284 of file class.ilObjFile.php.

284 : self
285 {
286 $this->resource_id = $resource_id;
287 return $this;
288 }
string $resource_id

References $resource_id.

Referenced by appendStream(), and appendUpload().

+ Here is the caller graph for this function:

◆ setVersion()

ilObjFile::setVersion ( int  $a_version)

Definition at line 264 of file class.ilObjFile.php.

264 : void
265 {
266 $this->version = $a_version;
267 }

◆ stripTitleOfFileExtension()

ilObjFile::stripTitleOfFileExtension ( string  $a_title)

Definition at line 709 of file class.ilObjFile.php.

709 : string
710 {
711 return $this->secure(preg_replace('/\.[^.]*$/', '', $a_title));
712 }

◆ updateObjectFromCurrentRevision()

ilObjFile::updateObjectFromCurrentRevision ( )

Definition at line 115 of file class.ilObjFile.php.

115 : void
116 {
118 $this->manager->getCurrentRevision($this->manager->find($this->getResourceId()))
119 );
120 }

References updateObjectFromRevision().

+ Here is the call graph for this function:

◆ updateObjectFromRevision()

ilObjFile::updateObjectFromRevision ( Revision  $r)
private

Definition at line 122 of file class.ilObjFile.php.

122 : void
123 {
124 $this->initFileInfo($this->getId(), false);
125 $this->setTitle(
126 $this->ensureSuffix(
127 $r->getTitle(),
128 $this->extractSuffixFromFilename($r->getInformation()->getTitle())
129 )
130 );
131 $this->setFileName($r->getInformation()->getTitle());
132 $this->update();
133 }
setFileName(string $a_name)

References ensureSuffix(), ilObject\getId(), ILIAS\ResourceStorage\Revision\Revision\getInformation(), ILIAS\ResourceStorage\Revision\Revision\getTitle(), initFileInfo(), setFileName(), ilObject\setTitle(), and ilObject2\update().

Referenced by appendStream(), appendUpload(), deleteVersions(), replaceWithStream(), replaceWithUpload(), rollback(), and updateObjectFromCurrentRevision().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $action

string ilObjFile::$action = ''
protected

Definition at line 61 of file class.ilObjFile.php.

Referenced by getAction().

◆ $amount_of_downloads

int ilObjFile::$amount_of_downloads = 0
protected

Definition at line 69 of file class.ilObjFile.php.

Referenced by getAmountOfDownloads().

◆ $copyright_id

string ilObjFile::$copyright_id = null
protected

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

Referenced by getCopyrightID(), and setCopyrightID().

◆ $database

ilDBInterface ilObjFile::$database
private

Definition at line 67 of file class.ilObjFile.php.

◆ $file_info

ilObjFileInfo ilObjFile::$file_info
protected

Definition at line 47 of file class.ilObjFile.php.

◆ $filename

string ilObjFile::$filename = ''
protected

Definition at line 55 of file class.ilObjFile.php.

◆ $filesize

int ilObjFile::$filesize
protected

Definition at line 57 of file class.ilObjFile.php.

◆ $filetype

string ilObjFile::$filetype = ''
protected

Definition at line 56 of file class.ilObjFile.php.

◆ $implementation

ilObjFileImplementationInterface ilObjFile::$implementation
protected

Definition at line 49 of file class.ilObjFile.php.

◆ $important_info

string ilObjFile::$important_info = null
protected

Definition at line 51 of file class.ilObjFile.php.

Referenced by getImportantInfo().

◆ $log

ilLogger ilObjFile::$log
protected

Definition at line 54 of file class.ilObjFile.php.

◆ $manager

Manager ilObjFile::$manager
protected

Definition at line 64 of file class.ilObjFile.php.

◆ $max_version

int ilObjFile::$max_version = 0
protected

Definition at line 59 of file class.ilObjFile.php.

Referenced by getMaxVersion().

◆ $mode

string ilObjFile::$mode = self::MODE_OBJECT

Definition at line 63 of file class.ilObjFile.php.

Referenced by getMode().

◆ $on_click_mode

int ilObjFile::$on_click_mode = self::CLICK_MODE_DOWNLOAD
protected

Definition at line 68 of file class.ilObjFile.php.

Referenced by getOnClickMode(), and setOnclickMode().

◆ $page_count

int ilObjFile::$page_count = 0
protected

Definition at line 52 of file class.ilObjFile.php.

Referenced by getPageCount(), and setPageCount().

◆ $rating

bool ilObjFile::$rating = false
protected

Definition at line 53 of file class.ilObjFile.php.

Referenced by hasRating().

◆ $resource_id

string ilObjFile::$resource_id = null
protected

Definition at line 62 of file class.ilObjFile.php.

Referenced by setResourceId().

◆ $stakeholder

ilObjFileStakeholder ilObjFile::$stakeholder
protected

Definition at line 66 of file class.ilObjFile.php.

◆ $upload

FileUpload ilObjFile::$upload
protected

Definition at line 65 of file class.ilObjFile.php.

◆ $version

int ilObjFile::$version = 0
protected

Definition at line 58 of file class.ilObjFile.php.

◆ CLICK_MODE_DOWNLOAD

◆ CLICK_MODE_INFOPAGE

const ilObjFile::CLICK_MODE_INFOPAGE = 2

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

Referenced by ilObjFileGUI\initPropertiesForm().

◆ MODE_FILELIST

const ilObjFile::MODE_FILELIST = "filelist"

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

Referenced by ilModulesFileTest\testAppendStream().

◆ MODE_OBJECT

const ilObjFile::MODE_OBJECT = "object"

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

Referenced by doRead().

◆ OBJECT_TYPE


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