ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 (?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)
 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 = 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 34 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

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

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

76  {
77  global $DIC;
78  $this->manager = $DIC->resourceStorage()->manage();
79  $this->database = $DIC->database();
80  $this->implementation = new ilObjFileImplementationEmpty();
81  $this->stakeholder = new ilObjFileStakeholder($DIC->user()->getId());
82  $this->upload = $DIC->upload();
83  $this->log = ilLoggerFactory::getLogger(self::OBJECT_TYPE);
84 
85  parent::__construct($a_id, $a_call_by_reference);
86  $this->initFileInfo($a_id, $a_call_by_reference);
87  }
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.
initFileInfo(int $id, bool $is_ref_id)
global $DIC
Definition: shib_login.php:25
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ appendStream()

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

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

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

147  : int
148  {
149  $title = $this->ensureSuffix(
150  $title,
152  ?? pathinfo($stream->getMetadata('uri'))['extension']
153  ?? null
154  );
155  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
156  $revision = $this->manager->appendNewRevisionFromStream($i, $stream, $this->stakeholder, $title);
157  } else {
158  $i = $this->manager->stream($stream, $this->stakeholder, $title);
159  $revision = $this->manager->getCurrentRevision($i);
160  $this->setResourceId($i->serialize());
161  $this->initImplementation();
162  }
163  $this->enableNotification();
164  $this->updateObjectFromRevision($revision);
165 
166  return $revision->getVersionNumber();
167  }
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 133 of file class.ilObjFile.php.

References ensureSuffix(), and extractSuffixFromFilename().

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

133  : string
134  {
135  $suffix = $this->file_info->getSuffix();
136  $filename_suffix = $this->extractSuffixFromFilename($filename);
137  if (empty($suffix) || $suffix !== $filename_suffix) {
138  $suffix = $filename_suffix;
139  }
140 
141  return $this->ensureSuffix($title, $suffix);
142  }
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 172 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().

172  : int
173  {
174  $title = $this->appendSuffixToTitle($title, $result->getName());
175  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
176  $revision = $this->manager->appendNewRevision($i, $result, $this->stakeholder, $title);
177  } else {
178  $i = $this->manager->upload($result, $this->stakeholder, $title);
179  $revision = $this->manager->getCurrentRevision($i);
180  $this->setResourceId($i->serialize());
181  $this->initImplementation();
182  }
185  }
186  $this->enableNotification();
187  $this->updateObjectFromRevision($revision);
188 
189  return $revision->getVersionNumber();
190  }
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 526 of file class.ilObjFile.php.

526  : bool
527  {
528  // check, if file is used somewhere
529  $usages = $this->getUsages();
530  return $usages === [];
531  }

◆ beforeUpdate()

ilObjFile::beforeUpdate ( )
protected

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

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

509  : bool
510  {
511  $suffix = $this->file_info->getSuffix();
512  if (empty($suffix)) {
513  $suffix = $this->extractSuffixFromFilename($this->getTitle());
514  }
515  $this->setTitle($this->ensureSuffix($this->getTitle(), $suffix));
516 
517  // no meta data handling for file list files
518  if ($this->getMode() !== self::MODE_FILELIST) {
519  $this->updateMetaData();
520  $this->updateCopyright();
521  }
522 
523  return true;
524  }
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 692 of file class.ilObjFile.php.

References appendSuffixToTitle().

692  : string
693  {
694  return $this->appendSuffixToTitle($new_title, $new_filename);
695  }
appendSuffixToTitle(string $title, string $filename)
+ Here is the call graph for this function:

◆ clearDataDirectory()

ilObjFile::clearDataDirectory ( )

Deprecated:

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

629  : void
630  {
631  $this->implementation->clearDataDirectory();
632  }

◆ deleteVersions()

ilObjFile::deleteVersions (   $a_hist_entry_ids = null)

Deprecated:

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

References getResourceId(), and updateObjectFromRevision().

638  : void
639  {
640  $this->implementation->deleteVersions($a_hist_entry_ids);
641  // update file object as the deletion of versions might affect its attributes (title, max_version etc.)
642  if ($this->getResourceId() && $rid = $this->manager->find($this->getResourceId())) {
643  $latest_revision = $this->manager->getCurrentRevision($rid);
644  $this->updateObjectFromRevision($latest_revision);
645  }
646  }
updateObjectFromRevision(Revision $r)
+ Here is the call graph for this function:

◆ directDownload()

ilObjFile::directDownload ( )

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

383  : bool
384  {
385  return $this->on_click_mode === self::CLICK_MODE_DOWNLOAD;
386  }

◆ doCloneObject()

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

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

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

464  : void
465  {
466  assert($new_obj instanceof ilObjFile);
467  $identification = $this->manager->find($this->resource_id);
468  if ($identification === null) {
469  throw new RuntimeException('Cannot clone file since no corresponding resource identification was found');
470  }
471 
472  $this->cloneMetaData($new_obj);
473  // object created now copy other settings
474  $new_obj->updateFileData();
475 
476  // Copy Resource
477  $cloned_title = $new_obj->getTitle();
478  $new_resource_identification = $this->manager->clone($identification);
479  $new_current_revision = $this->manager->getCurrentRevision($new_resource_identification);
480  $new_obj->setResourceId($new_resource_identification->serialize());
481  $new_obj->initImplementation();
482  $new_obj->updateObjectFromRevision($new_current_revision); // Previews are already copied in 453
483  $new_obj->setTitle($cloned_title); // see https://mantis.ilias.de/view.php?id=31375
484  $new_obj->setPageCount($this->getPageCount());
485  $new_obj->update();
486 
487  $new_obj->getObjectProperties()->storePropertyIsOnline(new ilObjectPropertyIsOnline(true));
488 
489  // Copy learning progress settings
490  $obj_settings = new ilLPObjSettings($this->getId());
491  $obj_settings->cloneSettings($new_obj->getId());
492  unset($obj_settings);
493  }
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 434 of file class.ilObjFile.php.

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

434  : void
435  {
436  $this->createProperties(true);
437  $this->updateCopyright();
438  $this->getObjectProperties()->storePropertyIsOnline(new ilObjectPropertyIsOnline(true));
439  $this->notifyCreation($this->getId(), $this->getDescription());
440  }
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 533 of file class.ilObjFile.php.

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

533  : void
534  {
535  // delete file data entry
536  $this->database->manipulateF("DELETE FROM file_data WHERE file_id = %s", ['integer'], [$this->getId()]);
537 
538  // delete history entries
540 
541  // delete meta data
542  if ($this->getMode() !== self::MODE_FILELIST) {
543  $this->deleteMetaData();
544  }
545 
546  // delete resource
547  $identification = $this->getResourceId();
548  if ($identification && $identification !== '-') {
549  $resource = $this->manager->find($identification);
550  if ($resource !== null) {
551  $this->manager->remove($resource, $this->stakeholder);
552  }
553  }
554  }
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 442 of file class.ilObjFile.php.

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

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

◆ doUpdate()

ilObjFile::doUpdate ( )
protected

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

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

495  : void
496  {
497  $a_columns = $this->getArrayForDatabase();
498  $this->database->update('file_data', $a_columns, [
499  'file_id' => [
500  'integer',
501  $this->getId(),
502  ],
503  ]);
504 
505  $this->notifyUpdate($this->getId(), $this->getDescription());
506  $this->initImplementation();
507  }
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 660 of file class.ilObjFile.php.

660  : void
661  {
662  //
663  }

◆ getAction()

ilObjFile::getAction ( )
Deprecated:

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

References $action.

378  : string
379  {
380  return $this->action;
381  }
string $action

◆ getAmountOfDownloads()

ilObjFile::getAmountOfDownloads ( )

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

References $amount_of_downloads.

Referenced by getArrayForDatabase(), and sendFile().

398  : int
399  {
401  }
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 559 of file class.ilObjFile.php.

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

Referenced by doUpdate().

559  : array
560  {
561  return [
562  'file_id' => ['integer', $this->getId()],
563  'file_name' => ['text', $this->getFileName()],
564  'f_mode' => ['text', $this->getMode()],
565  'important_info' => ['text', $this->getImportantInfo()],
566  'page_count' => ['text', $this->getPageCount()],
567  'rating' => ['integer', $this->hasRating()],
568  'rid' => ['text', $this->resource_id ?? ''],
569  'on_click_mode' => ['integer', $this->getOnClickMode()],
570  'downloads' => ['integer', $this->getAmountOfDownloads()],
571  ];
572  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopyrightID()

ilObjFile::getCopyrightID ( )

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

References $copyright_id.

355  : ?string
356  {
357  return $this->copyright_id;
358  }
string $copyright_id

◆ getDirectory()

ilObjFile::getDirectory (   $a_version = 0)

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

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

◆ getDownloadFilename()

ilObjFile::getDownloadFilename ( )

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

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

◆ getFile()

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

Implements ilObjFileImplementationInterface.

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

References initImplementation().

Referenced by ilCollectWorkspaceFilesJob\getFileDirs().

231  : string
232  {
233  $this->initImplementation();
234  return $this->implementation->getFile($a_hist_entry_id);
235  }
+ 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 697 of file class.ilObjFile.php.

697  : string
698  {
699  return $this->implementation->getFileExtension();
700  }

◆ getFileName()

ilObjFile::getFileName ( )

Implements ilObjFileImplementationInterface.

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

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

267  : string
268  {
269  return $this->implementation->getFileName();
270  }
+ Here is the caller graph for this function:

◆ getFileSize()

ilObjFile::getFileSize ( )

Implements ilObjFileImplementationInterface.

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

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

◆ getFileType()

ilObjFile::getFileType ( )

Implements ilObjFileImplementationInterface.

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

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

◆ getImportantInfo()

ilObjFile::getImportantInfo ( )

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

References $important_info.

Referenced by getArrayForDatabase().

247  : ?string
248  {
249  return $this->important_info;
250  }
string $important_info
+ Here is the caller graph for this function:

◆ getLPMode()

ilObjFile::getLPMode ( )

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

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

412  : int
413  {
414  return ilObjectLP::getInstance($this->getId())->getCurrentMode();
415  }
static getInstance(int $obj_id)
+ Here is the call graph for this function:

◆ getMaxVersion()

ilObjFile::getMaxVersion ( )

Implements ilObjFileImplementationInterface.

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

References $max_version.

342  : int
343  {
344  return $this->max_version;
345  }

◆ getMode()

ilObjFile::getMode ( )

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

References $mode.

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

298  : string
299  {
300  return $this->mode;
301  }
+ Here is the caller graph for this function:

◆ getOnClickMode()

ilObjFile::getOnClickMode ( )

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

References $on_click_mode.

Referenced by getArrayForDatabase().

388  : int
389  {
390  return $this->on_click_mode;
391  }
+ Here is the caller graph for this function:

◆ getPageCount()

ilObjFile::getPageCount ( )

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

References $page_count.

Referenced by doCloneObject(), and getArrayForDatabase().

365  : int
366  {
367  return $this->page_count;
368  }
+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilObjFile::getPresentationTitle ( )

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

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

◆ getResourceId()

ilObjFile::getResourceId ( )

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

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

288  : string
289  {
290  return $this->resource_id ?? '-';
291  }
+ Here is the caller graph for this function:

◆ getStorageID()

ilObjFile::getStorageID ( )

Implements ilObjFileImplementationInterface.

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

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

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

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

605  : bool
606  {
607  $this->prepareUpload();
608 
609  $results = $this->upload->getResults();
610  $upload = $results[$a_upload_file];
611 
612  $this->appendUpload($upload, $title);
613 
614  return true;
615  }
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 257 of file class.ilObjFile.php.

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

◆ getVersions()

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

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

Referenced by ilObjFileComponentBuilder\buildConfirmDeleteSpecificVersionsModal().

669  : array
670  {
671  return $this->implementation->getVersions($version_ids);
672  }
+ Here is the caller graph for this function:

◆ handleChangedObjectTitle()

ilObjFile::handleChangedObjectTitle ( string  $new_title)

Implements ilObjFileImplementationInterface.

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

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

427  : void
428  {
429  $new_title = $this->ensureSuffix($new_title, $this->file_info->getSuffix());
430  $this->setTitle($new_title);
431  $this->implementation->handleChangedObjectTitle($new_title);
432  }
setTitle(string $title)
ensureSuffix(string $title, ?string $suffix=null)
+ Here is the call graph for this function:

◆ hasRating()

ilObjFile::hasRating ( )

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

References $rating.

Referenced by getArrayForDatabase().

337  : bool
338  {
339  return $this->rating;
340  }
+ Here is the caller graph for this function:

◆ initFileInfo()

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

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

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

89  : void
90  {
91  $repository = new ilObjFileInfoRepository();
92  $this->file_info = $is_ref_id ? $repository->getByRefId($id) : $repository->getByObjectId($id);
93  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
+ Here is the caller graph for this function:

◆ initImplementation()

ilObjFile::initImplementation ( )
protected

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

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

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

100  : void
101  {
102  if ($this->resource_id && ($id = $this->manager->find(
103  $this->resource_id
104  )) instanceof ResourceIdentification) {
105  $resource = $this->manager->getResource($id);
106  $this->implementation = new ilObjFileImplementationStorage($resource);
107  $this->max_version = $resource->getMaxRevision(false);
108  $this->version = $resource->getCurrentRevision()->getVersionNumber();
109  }
110  $this->initFileInfo($this->getId(), false);
111  }
Class ilObjFileImplementationStorage.
initFileInfo(int $id, bool $is_ref_id)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initType()

ilObjFile::initType ( )
protected

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

574  : void
575  {
576  $this->type = self::OBJECT_TYPE;
577  }

◆ isHidden()

ilObjFile::isHidden ( )
Deprecated:

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

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

620  : bool
621  {
622  return ilObjFileAccess::_isFileHidden($this->getTitle());
623  }
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 589 of file class.ilObjFile.php.

References ILIAS\Repository\upload().

Referenced by getUploadFile().

589  : void
590  {
591  if (!$this->upload->hasBeenProcessed()) {
592  if (defined('PATH_TO_GHOSTSCRIPT') && PATH_TO_GHOSTSCRIPT !== "") {
593  $this->upload->register(new ilCountPDFPagesPreProcessors());
594  }
595 
596  $this->upload->process();
597  }
598  }
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 584 of file class.ilObjFile.php.

585  {
586  return null;
587  }

◆ replaceWithStream()

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

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

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

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

211  : int
212  {
213  $title = $this->appendSuffixToTitle($title, $result->getName());
214  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
215  $revision = $this->manager->replaceWithUpload($i, $result, $this->stakeholder, $title);
216  } else {
217  throw new LogicException('only files with existing resource and revision can be replaced');
218  }
221  }
222  $this->enableNotification();
223  $this->updateObjectFromRevision($revision);
224 
225  return $revision->getVersionNumber();
226  }
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 678 of file class.ilObjFile.php.

References getResourceId(), and updateObjectFromRevision().

678  : void
679  {
680  if ($this->getResourceId() && $i = $this->manager->find($this->getResourceId())) {
681  $this->manager->rollbackRevision($i, $version_id);
682  $latest_revision = $this->manager->getCurrentRevision($i);
683  $this->updateObjectFromRevision($latest_revision);
684  } else {
685  throw new LogicException('only files with existing resource and revision can be replaced');
686  }
687  }
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 648 of file class.ilObjFile.php.

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

648  : void
649  {
650  // increment file download count by one.
651  $this->setAmountOfDownloads($this->getAmountOfDownloads() + 1);
652  $this->update();
653  $info = (new ilObjFileInfoRepository())->getByObjectId($this->getId());
654  $this->implementation->sendFile($a_hist_entry_id, $info->shouldDeliverInline());
655  }
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 422 of file class.ilObjFile.php.

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

◆ setAmountOfDownloads()

ilObjFile::setAmountOfDownloads ( int  $amount)

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

Referenced by sendFile().

403  : void
404  {
405  if (0 > $amount) {
406  throw new LogicException("Amount cannot be a negative number.");
407  }
408 
409  $this->amount_of_downloads = $amount;
410  }
+ Here is the caller graph for this function:

◆ setCopyrightID()

ilObjFile::setCopyrightID ( ?string  $copyright_id)

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

References $copyright_id.

360  : void
361  {
362  $this->copyright_id = $copyright_id;
363  }
string $copyright_id

◆ setFileName()

ilObjFile::setFileName ( string  $a_name)

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

Referenced by updateObjectFromRevision().

272  : void
273  {
274  $this->filename = $a_name;
275  }
+ Here is the caller graph for this function:

◆ setFileSize()

ilObjFile::setFileSize ( int  $a_size)
Returns
never

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

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

◆ setFileType()

ilObjFile::setFileType ( string  $a_type)
Returns
never

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

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

◆ setImportantInfo()

ilObjFile::setImportantInfo ( string  $a_important_info)

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

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

◆ setMaxVersion()

ilObjFile::setMaxVersion ( int  $a_max_version)
Returns
never

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

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

◆ setMode()

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

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

306  : void
307  {
308  $this->mode = $a_mode;
309  }

◆ setOnclickMode()

ilObjFile::setOnclickMode ( int  $on_click_mode)

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

References $on_click_mode.

393  : void
394  {
395  $this->on_click_mode = $on_click_mode;
396  }

◆ setPageCount()

ilObjFile::setPageCount ( int  $page_count)

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

References $page_count.

Referenced by appendUpload(), and replaceWithUpload().

370  : void
371  {
372  $this->page_count = $page_count;
373  }
+ Here is the caller graph for this function:

◆ setRating()

ilObjFile::setRating ( bool  $a_value)

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

277  : void
278  {
279  $this->rating = $a_value;
280  }

◆ setResourceId()

ilObjFile::setResourceId ( ?string  $resource_id)

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

References $resource_id.

Referenced by appendStream(), and appendUpload().

282  : self
283  {
284  $this->resource_id = $resource_id;
285  return $this;
286  }
string $resource_id
+ Here is the caller graph for this function:

◆ setVersion()

ilObjFile::setVersion ( int  $a_version)

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

262  : void
263  {
264  $this->version = $a_version;
265  }

◆ stripTitleOfFileExtension()

ilObjFile::stripTitleOfFileExtension ( string  $a_title)

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

702  : string
703  {
704  return $this->secure(preg_replace('/\.[^.]*$/', '', $a_title));
705  }

◆ updateObjectFromCurrentRevision()

ilObjFile::updateObjectFromCurrentRevision ( )

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

References updateObjectFromRevision().

113  : void
114  {
116  $this->manager->getCurrentRevision($this->manager->find($this->getResourceId()))
117  );
118  }
updateObjectFromRevision(Revision $r)
+ Here is the call graph for this function:

◆ updateObjectFromRevision()

ilObjFile::updateObjectFromRevision ( Revision  $r)
private

Definition at line 120 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().

120  : void
121  {
122  $this->initFileInfo($this->getId(), false);
123  $this->setTitle(
124  $this->ensureSuffix(
125  $r->getTitle(),
126  $this->extractSuffixFromFilename($r->getInformation()->getTitle())
127  )
128  );
129  $this->setFileName($r->getInformation()->getTitle());
130  $this->update();
131  }
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 60 of file class.ilObjFile.php.

Referenced by getAction().

◆ $amount_of_downloads

int ilObjFile::$amount_of_downloads = 0
protected

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

Referenced by getAmountOfDownloads().

◆ $copyright_id

string ilObjFile::$copyright_id = null
protected

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

Referenced by getCopyrightID(), and setCopyrightID().

◆ $database

ilDBInterface ilObjFile::$database
private

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

◆ $file_info

ilObjFileInfo ilObjFile::$file_info
protected

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

◆ $filename

string ilObjFile::$filename = ''
protected

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

◆ $filesize

int ilObjFile::$filesize
protected

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

◆ $filetype

string ilObjFile::$filetype = ''
protected

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

◆ $implementation

ilObjFileImplementationInterface ilObjFile::$implementation
protected

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

◆ $important_info

string ilObjFile::$important_info = null
protected

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

Referenced by getImportantInfo().

◆ $log

ilLogger ilObjFile::$log
protected

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

◆ $manager

Manager ilObjFile::$manager
protected

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

◆ $max_version

int ilObjFile::$max_version = 0
protected

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

Referenced by getMaxVersion().

◆ $mode

string ilObjFile::$mode = self::MODE_OBJECT

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

Referenced by getMode().

◆ $on_click_mode

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

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

Referenced by getOnClickMode(), and setOnclickMode().

◆ $page_count

int ilObjFile::$page_count = 0
protected

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

Referenced by getPageCount(), and setPageCount().

◆ $rating

bool ilObjFile::$rating = false
protected

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

Referenced by hasRating().

◆ $resource_id

string ilObjFile::$resource_id = null
protected

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

Referenced by setResourceId().

◆ $stakeholder

ilObjFileStakeholder ilObjFile::$stakeholder
protected

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

◆ $upload

FileUpload ilObjFile::$upload
protected

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

◆ $version

int ilObjFile::$version = 0
protected

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

◆ CLICK_MODE_DOWNLOAD

◆ CLICK_MODE_INFOPAGE

const ilObjFile::CLICK_MODE_INFOPAGE = 2

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

Referenced by ilObjFileGUI\initPropertiesForm().

◆ MODE_FILELIST

const ilObjFile::MODE_FILELIST = "filelist"

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

Referenced by ilModulesFileTest\testAppendStream().

◆ MODE_OBJECT

const ilObjFile::MODE_OBJECT = "object"

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

◆ OBJECT_TYPE


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