ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 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 (?int $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)
 This Method is used to append a fileupload by it's POST-name to the current ilObjFile More...
 
 isHidden ()
 
 clearDataDirectory ()
 
 deleteVersions ($a_hist_entry_ids=null)
 
 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 ()
 
 cloneMetaData (ilObject $target_obj)
 
 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)
 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...
 
 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 = 1
 
int $max_version = 1
 
int $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
 
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 _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

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

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

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ilLoggerFactory\getLogger(), initFileInfo(), and ILIAS\Repository\upload().

75  {
76  global $DIC;
77  $this->manager = $DIC->resourceStorage()->manage();
78  $this->database = $DIC->database();
79  $this->implementation = new ilObjFileImplementationEmpty();
80  $this->stakeholder = new ilObjFileStakeholder($DIC->user()->getId());
81  $this->upload = $DIC->upload();
82  $this->version = 0;
83  $this->max_version = 0;
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  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjFileStakeholder.
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: feed.php:28
initFileInfo(int $id, bool $is_ref_id)
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ appendStream()

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

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

References enableNotification(), ensureSuffix(), extractSuffixFromFilename(), getResourceId(), initImplementation(), setResourceId(), and updateObjectFromRevision().

154  : int
155  {
156  $title = $this->ensureSuffix(
157  $title,
159  ?? pathinfo($stream->getMetadata('uri'))['extension']
160  ?? null
161  );
162  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
163  $revision = $this->manager->appendNewRevisionFromStream($i, $stream, $this->stakeholder, $title);
164  } else {
165  $i = $this->manager->stream($stream, $this->stakeholder, $title);
166  $revision = $this->manager->getCurrentRevision($i);
167  $this->setResourceId($i->serialize());
168  $this->initImplementation();
169  }
170  $this->enableNotification();
171  $this->updateObjectFromRevision($revision);
172 
173  return $revision->getVersionNumber();
174  }
string $title
updateObjectFromRevision(Revision $r)
extractSuffixFromFilename(string $filename)
enableNotification()
setResourceId(?string $resource_id)
ensureSuffix(string $title, ?string $suffix=null)
+ Here is the call graph for this function:

◆ appendSuffixToTitle()

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

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

References ilObject\$title, ensureSuffix(), and extractSuffixFromFilename().

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

138  : string
139  {
140  $suffix = $this->file_info->getSuffix();
141  $filename_suffix = $this->extractSuffixFromFilename($filename);
142  if (empty($suffix) || $suffix !== $filename_suffix) {
143  $suffix = $filename_suffix;
144  }
145 
146  $title = $this->ensureSuffix($title, $suffix);
147 
148  return $title;
149  }
string $title
extractSuffixFromFilename(string $filename)
string $filename
ensureSuffix(string $title, ?string $suffix=null)
+ 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 179 of file class.ilObjFile.php.

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

Referenced by getUploadFile().

179  : int
180  {
181  $title = $this->appendSuffixToTitle($title, $result->getName());
182  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
183  $revision = $this->manager->appendNewRevision($i, $result, $this->stakeholder, $title);
184  } else {
185  $i = $this->manager->upload($result, $this->stakeholder, $title);
186  $revision = $this->manager->getCurrentRevision($i);
187  $this->setResourceId($i->serialize());
188  $this->initImplementation();
189  }
192  }
193  $this->enableNotification();
194  $this->updateObjectFromRevision($revision);
195 
196  return $revision->getVersionNumber();
197  }
string $title
updateObjectFromRevision(Revision $r)
appendSuffixToTitle(string $title, string $filename)
setPageCount(int $page_count)
enableNotification()
setResourceId(?string $resource_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ beforeDelete()

ilObjFile::beforeDelete ( )
protected

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 count($usages) === 0;
538  }

◆ beforeUpdate()

ilObjFile::beforeUpdate ( )
protected

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

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

516  : bool
517  {
518  $suffix = $this->file_info->getSuffix();
519  if (empty($suffix)) {
520  $suffix = $this->extractSuffixFromFilename($this->getTitle());
521  }
522  $this->setTitle($this->ensureSuffix($this->getTitle(), $suffix));
523 
524  // no meta data handling for file list files
525  if ($this->getMode() !== self::MODE_FILELIST) {
526  $this->updateMetaData();
527  $this->updateCopyright();
528  }
529 
530  return true;
531  }
setTitle(string $title)
extractSuffixFromFilename(string $filename)
updateCopyright()
update copyright meta data
ensureSuffix(string $title, ?string $suffix=null)
+ 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.

References appendSuffixToTitle().

699  : string
700  {
701  return $this->appendSuffixToTitle($new_title, $new_filename);
702  }
appendSuffixToTitle(string $title, string $filename)
+ Here is the call graph for this function:

◆ clearDataDirectory()

ilObjFile::clearDataDirectory ( )

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)

Deprecated:

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

References getResourceId(), and updateObjectFromRevision().

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  }
updateObjectFromRevision(Revision $r)
+ Here is the call graph for this function:

◆ directDownload()

ilObjFile::directDownload ( )

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

390  : bool
391  {
392  return $this->on_click_mode === self::CLICK_MODE_DOWNLOAD;
393  }

◆ doCloneObject()

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

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

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

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

◆ doCreate()

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

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

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

441  : void
442  {
443  $this->createProperties(true);
444  $this->updateCopyright();
445  $this->getObjectProperties()->storePropertyIsOnline(new ilObjectPropertyIsOnline(true));
446  $this->notifyCreation($this->getId(), $this->getDescription());
447  }
notifyCreation(int $obj_id, string $additional_message=null)
createProperties(bool $a_upload=false)
The basic properties of a file object are stored in table object_data.
updateCopyright()
update copyright meta data
+ Here is the call graph for this function:

◆ doDelete()

ilObjFile::doDelete ( )
protected

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

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

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
+ Here is the call graph for this function:

◆ doRead()

ilObjFile::doRead ( )
protected

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

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

449  : void
450  {
451  $q = "SELECT * FROM file_data WHERE file_id = %s";
452  $r = $this->database->queryF($q, ['integer'], [$this->getId()]);
453  $row = $r->fetchObject();
454 
455  $this->filename = $this->secure($row->file_name ?? '');
456  $this->filetype = $row->file_type ?? '';
457  $this->filesize = $row->file_size ?? 0;
458  $this->version = $row->version ?? 1;
459  $this->max_version = $row->max_version ?? 1;
460  $this->mode = $row->f_mode ?? self::MODE_OBJECT;
461  $this->important_info = $row->important_info ?? "";
462  $this->rating = (bool) ($row->rating ?? false);
463  $this->page_count = (int) ($row->page_count ?? 0);
464  $this->resource_id = $row->rid ?? null;
465  $this->on_click_mode = (int) ($row->on_click_mode ?? self::CLICK_MODE_DOWNLOAD);
466  $this->amount_of_downloads = (int) ($row->downloads ?? 0);
467 
468  $this->initImplementation();
469  }
$q
Definition: shib_logout.php:21
$r
+ Here is the call graph for this function:

◆ doUpdate()

ilObjFile::doUpdate ( )
protected

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

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

502  : void
503  {
504  $a_columns = $this->getArrayForDatabase();
505  $this->database->update('file_data', $a_columns, [
506  'file_id' => [
507  'integer',
508  $this->getId(),
509  ],
510  ]);
511 
512  $this->notifyUpdate($this->getId(), $this->getDescription());
513  $this->initImplementation();
514  }
notifyUpdate(int $obj_id, string $additional_message=null)
+ 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 385 of file class.ilObjFile.php.

References $action.

385  : string
386  {
387  return $this->action;
388  }
string $action

◆ getAmountOfDownloads()

ilObjFile::getAmountOfDownloads ( )

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

References $amount_of_downloads.

Referenced by getArrayForDatabase(), and sendFile().

405  : int
406  {
408  }
int $amount_of_downloads
+ 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.

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

Referenced by doUpdate().

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  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopyrightID()

ilObjFile::getCopyrightID ( )

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

References $copyright_id.

362  : ?int
363  {
364  return $this->copyright_id;
365  }

◆ getDirectory()

ilObjFile::getDirectory (   $a_version = 0)

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

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

◆ getDownloadFilename()

ilObjFile::getDownloadFilename ( )

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

249  : string
250  {
251  return $this->implementation->getDownloadFilename();
252  }

◆ getFile()

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

Implements ilObjFileImplementationInterface.

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

References initImplementation().

Referenced by ilCollectWorkspaceFilesJob\getFileDirs().

238  : string
239  {
240  $this->initImplementation();
241  return $this->implementation->getFile($a_hist_entry_id);
242  }
+ Here is the call graph for this function:
+ Here is the caller 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 274 of file class.ilObjFile.php.

Referenced by getArrayForDatabase(), and ilDclReferenceFieldRepresentation\getInputField().

274  : string
275  {
276  return $this->implementation->getFileName();
277  }
+ Here is the caller graph for this function:

◆ getFileSize()

ilObjFile::getFileSize ( )

Implements ilObjFileImplementationInterface.

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

318  : int
319  {
320  return $this->implementation->getFileSize();
321  }

◆ getFileType()

ilObjFile::getFileType ( )

Implements ilObjFileImplementationInterface.

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

331  : string
332  {
333  return $this->implementation->getFileType();
334  }

◆ getImportantInfo()

ilObjFile::getImportantInfo ( )

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

References $important_info.

Referenced by getArrayForDatabase().

254  : ?string
255  {
256  return $this->important_info;
257  }
string $important_info
+ Here is the caller graph for this function:

◆ getLPMode()

ilObjFile::getLPMode ( )

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

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

419  : int
420  {
421  return ilObjectLP::getInstance($this->getId())->getCurrentMode();
422  }
static getInstance(int $obj_id)
+ Here is the call graph for this function:

◆ getMaxVersion()

ilObjFile::getMaxVersion ( )

Implements ilObjFileImplementationInterface.

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

References $max_version.

349  : int
350  {
351  return $this->max_version;
352  }

◆ getMode()

ilObjFile::getMode ( )

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

References $mode.

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

305  : string
306  {
307  return $this->mode;
308  }
+ Here is the caller graph for this function:

◆ getOnClickMode()

ilObjFile::getOnClickMode ( )

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

References $on_click_mode.

Referenced by getArrayForDatabase().

395  : int
396  {
397  return $this->on_click_mode;
398  }
+ Here is the caller graph for this function:

◆ getPageCount()

ilObjFile::getPageCount ( )

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

References $page_count.

Referenced by doCloneObject(), and getArrayForDatabase().

372  : int
373  {
374  return $this->page_count;
375  }
+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilObjFile::getPresentationTitle ( )

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

100  : string
101  {
102  return $this->file_info->getHeaderTitle();
103  }

◆ getResourceId()

ilObjFile::getResourceId ( )

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

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

295  : string
296  {
297  return $this->resource_id ?? '-';
298  }
+ Here is the caller graph for this function:

◆ getStorageID()

ilObjFile::getStorageID ( )

Implements ilObjFileImplementationInterface.

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

300  : ?string
301  {
302  return $this->implementation->getStorageID();
303  }

◆ getUploadFile()

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

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.

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

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  }
string $title
appendUpload(UploadResult $result, string $title)
$results
FileUpload $upload
+ Here is the call graph for this function:

◆ getVersion()

ilObjFile::getVersion ( bool  $inclduing_drafts = false)

Implements ilObjFileImplementationInterface.

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

264  : int
265  {
266  return $this->implementation->getVersion($inclduing_drafts);
267  }

◆ getVersions()

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

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

Referenced by ilObjFileComponentBuilder\buildConfirmDeleteSpecificVersionsModal().

676  : array
677  {
678  return $this->implementation->getVersions($version_ids);
679  }
+ Here is the caller graph for this function:

◆ handleChangedObjectTitle()

ilObjFile::handleChangedObjectTitle ( string  $new_title)

Implements ilObjFileImplementationInterface.

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

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

434  : void
435  {
436  $new_title = $this->ensureSuffix($new_title, $this->file_info->getSuffix());
437  $this->setTitle($new_title);
438  $this->implementation->handleChangedObjectTitle($new_title);
439  }
setTitle(string $title)
ensureSuffix(string $title, ?string $suffix=null)
+ Here is the call graph for this function:

◆ hasRating()

ilObjFile::hasRating ( )

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

References $rating.

Referenced by getArrayForDatabase().

344  : bool
345  {
346  return $this->rating;
347  }
+ 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.

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

90  : void
91  {
92  $repository = new ilObjFileInfoRepository();
93  if ($is_ref_id) {
94  $this->file_info = $repository->getByRefId($id);
95  } else {
96  $this->file_info = $repository->getByObjectId($id);
97  }
98  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ initImplementation()

ilObjFile::initImplementation ( )
protected

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

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

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

105  : void
106  {
107  if ($this->resource_id && ($id = $this->manager->find(
108  $this->resource_id
109  )) instanceof \ILIAS\ResourceStorage\Identification\ResourceIdentification) {
110  $resource = $this->manager->getResource($id);
111  $this->implementation = new ilObjFileImplementationStorage($resource);
112  $this->max_version = $resource->getMaxRevision(false);
113  $this->version = $resource->getCurrentRevision()->getVersionNumber();
114  }
115  $this->initFileInfo($this->getId(), false);
116  }
Class ilObjFileImplementationStorage.
Class ChatMainBarProvider .
initFileInfo(int $id, bool $is_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initType()

ilObjFile::initType ( )
protected

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

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

◆ isHidden()

ilObjFile::isHidden ( )
Deprecated:

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

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

627  : bool
628  {
629  return ilObjFileAccess::_isFileHidden($this->getTitle());
630  }
static _isFileHidden(string $a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user. ...
+ Here is the call graph for this function:

◆ prepareUpload()

ilObjFile::prepareUpload ( )
private

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

References ILIAS\Repository\upload().

Referenced by getUploadFile().

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.
+ 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.

592  {
593  return null;
594  }

◆ replaceWithStream()

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

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

References enableNotification(), getResourceId(), and updateObjectFromRevision().

202  : int
203  {
204  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
205  $revision = $this->manager->replaceWithStream($i, $stream, $this->stakeholder, $title);
206  } else {
207  throw new LogicException('only files with existing resource and revision can be replaced');
208  }
209  $this->enableNotification();
210  $this->updateObjectFromRevision($revision);
211 
212  return $revision->getVersionNumber();
213  }
string $title
updateObjectFromRevision(Revision $r)
enableNotification()
+ Here is the call graph for this function:

◆ replaceWithUpload()

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

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

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

218  : int
219  {
220  $title = $this->appendSuffixToTitle($title, $result->getName());
221  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
222  $revision = $this->manager->replaceWithUpload($i, $result, $this->stakeholder, $title);
223  } else {
224  throw new LogicException('only files with existing resource and revision can be replaced');
225  }
228  }
229  $this->enableNotification();
230  $this->updateObjectFromRevision($revision);
231 
232  return $revision->getVersionNumber();
233  }
string $title
updateObjectFromRevision(Revision $r)
appendSuffixToTitle(string $title, string $filename)
setPageCount(int $page_count)
enableNotification()
+ 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.

References getResourceId(), and updateObjectFromRevision().

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  }
updateObjectFromRevision(Revision $r)
+ 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.

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

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)
+ Here is the call graph for this function:

◆ setAction()

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

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

429  : void
430  {
431  throw new LogicException('cannot change action');
432  }

◆ setAmountOfDownloads()

ilObjFile::setAmountOfDownloads ( int  $amount)

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

Referenced by sendFile().

410  : void
411  {
412  if (0 > $amount) {
413  throw new LogicException("Amount cannot be a negative number.");
414  }
415 
416  $this->amount_of_downloads = $amount;
417  }
+ Here is the caller graph for this function:

◆ setCopyrightID()

ilObjFile::setCopyrightID ( ?int  $copyright_id)

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

References $copyright_id.

367  : void
368  {
369  $this->copyright_id = $copyright_id;
370  }

◆ setFileName()

ilObjFile::setFileName ( string  $a_name)

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

Referenced by updateObjectFromRevision().

279  : void
280  {
281  $this->filename = $a_name;
282  }
+ Here is the caller graph for this function:

◆ setFileSize()

ilObjFile::setFileSize ( int  $a_size)
Returns
never

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

326  : void
327  {
328  throw new LogicException('cannot change filesize');
329  }

◆ setFileType()

ilObjFile::setFileType ( string  $a_type)
Returns
never

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

339  : void
340  {
341  throw new LogicException('cannot change filetype');
342  }

◆ setImportantInfo()

ilObjFile::setImportantInfo ( string  $a_important_info)

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

259  : void
260  {
261  $this->important_info = empty($a_important_info) ? null : $a_important_info;
262  }

◆ setMaxVersion()

ilObjFile::setMaxVersion ( int  $a_max_version)
Returns
never

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

357  : void
358  {
359  throw new LogicException('cannot change max-version');
360  }

◆ setMode()

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

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

313  : void
314  {
315  $this->mode = $a_mode;
316  }

◆ setOnclickMode()

ilObjFile::setOnclickMode ( int  $on_click_mode)

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

References $on_click_mode.

400  : void
401  {
402  $this->on_click_mode = $on_click_mode;
403  }

◆ setPageCount()

ilObjFile::setPageCount ( int  $page_count)

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

References $page_count.

Referenced by appendUpload(), and replaceWithUpload().

377  : void
378  {
379  $this->page_count = $page_count;
380  }
+ Here is the caller graph for this function:

◆ setRating()

ilObjFile::setRating ( bool  $a_value)

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

284  : void
285  {
286  $this->rating = $a_value;
287  }

◆ setResourceId()

ilObjFile::setResourceId ( ?string  $resource_id)

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

References $resource_id.

Referenced by appendStream(), and appendUpload().

289  : self
290  {
291  $this->resource_id = $resource_id;
292  return $this;
293  }
string $resource_id
+ Here is the caller graph for this function:

◆ setVersion()

ilObjFile::setVersion ( int  $a_version)

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

269  : void
270  {
271  $this->version = $a_version;
272  }

◆ 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 118 of file class.ilObjFile.php.

References updateObjectFromRevision().

118  : void
119  {
121  $this->manager->getCurrentRevision($this->manager->find($this->getResourceId()))
122  );
123  }
updateObjectFromRevision(Revision $r)
+ Here is the call graph for this function:

◆ updateObjectFromRevision()

ilObjFile::updateObjectFromRevision ( Revision  $r)
private

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

References ensureSuffix(), extractSuffixFromFilename(), 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().

125  : void
126  {
127  $this->initFileInfo($this->getId(), false);
128  $this->setTitle(
129  $this->ensureSuffix(
130  $r->getTitle(),
131  $this->extractSuffixFromFilename($r->getInformation()->getTitle())
132  )
133  );
134  $this->setFileName($r->getInformation()->getTitle());
135  $this->update();
136  }
setFileName(string $a_name)
setTitle(string $title)
initFileInfo(int $id, bool $is_ref_id)
extractSuffixFromFilename(string $filename)
ensureSuffix(string $title, ?string $suffix=null)
+ 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 59 of file class.ilObjFile.php.

Referenced by getAction().

◆ $amount_of_downloads

int ilObjFile::$amount_of_downloads = 0
protected

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

Referenced by getAmountOfDownloads().

◆ $copyright_id

int ilObjFile::$copyright_id = null
protected

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

Referenced by getCopyrightID(), and setCopyrightID().

◆ $database

ilDBInterface ilObjFile::$database
private

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

◆ $file_info

ilObjFileInfo ilObjFile::$file_info
protected

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

◆ $filename

string ilObjFile::$filename = ''
protected

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

◆ $filesize

int ilObjFile::$filesize
protected

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

◆ $filetype

string ilObjFile::$filetype = ''
protected

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

◆ $implementation

ilObjFileImplementationInterface ilObjFile::$implementation
protected

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

◆ $important_info

string ilObjFile::$important_info = null
protected

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

Referenced by getImportantInfo().

◆ $log

ilLogger ilObjFile::$log
protected

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

◆ $manager

Manager ilObjFile::$manager
protected

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

◆ $max_version

int ilObjFile::$max_version = 1
protected

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

Referenced by getMaxVersion().

◆ $mode

string ilObjFile::$mode = self::MODE_OBJECT

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

Referenced by getMode().

◆ $on_click_mode

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

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

Referenced by getOnClickMode(), and setOnclickMode().

◆ $page_count

int ilObjFile::$page_count = 0
protected

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

Referenced by getPageCount(), and setPageCount().

◆ $rating

bool ilObjFile::$rating = false
protected

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

Referenced by hasRating().

◆ $resource_id

string ilObjFile::$resource_id = null
protected

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

Referenced by setResourceId().

◆ $stakeholder

ilObjFileStakeholder ilObjFile::$stakeholder
protected

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

◆ $upload

FileUpload ilObjFile::$upload
protected

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

◆ $version

int ilObjFile::$version = 1
protected

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

◆ CLICK_MODE_DOWNLOAD

◆ CLICK_MODE_INFOPAGE

const ilObjFile::CLICK_MODE_INFOPAGE = 2

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

Referenced by ilObjFileGUI\initPropertiesForm().

◆ MODE_FILELIST

const ilObjFile::MODE_FILELIST = "filelist"

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

Referenced by ilModulesFileTest\testAppendStream().

◆ MODE_OBJECT

const ilObjFile::MODE_OBJECT = "object"

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

◆ OBJECT_TYPE


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