ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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, int $new_obj_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 
- Public Member Functions inherited from ilObjFileImplementationInterface
 getDirectory (int $a_version=0)
 
 deleteVersions (?array $a_hist_entry_ids=null)
 Deletes the specified history entries or all entries if no ids are specified. More...
 
 getVersions (?array $version_ids=null)
 Gets the file versions for this object. More...
 

Data Fields

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

Protected Member Functions

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

Protected Attributes

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

Private Member Functions

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

Private Attributes

ilDBInterface $database
 

Additional Inherited Members

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

Detailed Description

Class ilObjFile.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

ilObjFile constructor.

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

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

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

77  {
78  global $DIC;
79  $this->manager = $DIC->resourceStorage()->manage();
80  $this->database = $DIC->database();
81  $this->implementation = new ilObjFileImplementationEmpty();
82  $this->stakeholder = new ilObjFileStakeholder($DIC->user()->getId());
83  $this->upload = $DIC->upload();
84  $this->log = ilLoggerFactory::getLogger(self::OBJECT_TYPE);
85 
86  parent::__construct($a_id, $a_call_by_reference);
87  $this->initFileInfo($a_id, $a_call_by_reference);
88  }
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:26
__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 149 of file class.ilObjFile.php.

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

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

References ensureSuffix(), and extractSuffixFromFilename().

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

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

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

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

◆ beforeUpdate()

ilObjFile::beforeUpdate ( )
protected

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

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

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

References appendSuffixToTitle().

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

◆ clearDataDirectory()

ilObjFile::clearDataDirectory ( )

Deprecated:

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

633  : void
634  {
635  $this->implementation->clearDataDirectory();
636  }

◆ deleteVersions()

ilObjFile::deleteVersions (   $a_hist_entry_ids = null)

Deprecated:

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

References getResourceId(), and updateObjectFromRevision().

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

◆ directDownload()

ilObjFile::directDownload ( )

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

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

◆ doCloneObject()

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

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

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

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

◆ doCreate()

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

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

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

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

◆ doDelete()

ilObjFile::doDelete ( )
protected

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

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

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

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

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

◆ doUpdate()

ilObjFile::doUpdate ( )
protected

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

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

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

664  : void
665  {
666  //
667  }

◆ getAction()

ilObjFile::getAction ( )
Deprecated:

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

References $action.

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

◆ getAmountOfDownloads()

ilObjFile::getAmountOfDownloads ( )

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

References $amount_of_downloads.

Referenced by getArrayForDatabase(), and sendFile().

400  : int
401  {
403  }
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 563 of file class.ilObjFile.php.

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

Referenced by doUpdate().

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

◆ getCopyrightID()

ilObjFile::getCopyrightID ( )

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

References $copyright_id.

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

◆ getDirectory()

ilObjFile::getDirectory (   $a_version = 0)

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

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

◆ getDownloadFilename()

ilObjFile::getDownloadFilename ( )

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

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

◆ getFile()

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

Implements ilObjFileImplementationInterface.

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

References initImplementation().

Referenced by ilCollectWorkspaceFilesJob\getFileDirs().

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

701  : string
702  {
703  return $this->implementation->getFileExtension();
704  }

◆ getFileName()

ilObjFile::getFileName ( )

Implements ilObjFileImplementationInterface.

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

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

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

◆ getFileSize()

ilObjFile::getFileSize ( )

Implements ilObjFileImplementationInterface.

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

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

◆ getFileType()

ilObjFile::getFileType ( )

Implements ilObjFileImplementationInterface.

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

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

◆ getImportantInfo()

ilObjFile::getImportantInfo ( )

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

References $important_info.

Referenced by getArrayForDatabase().

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

◆ getLPMode()

ilObjFile::getLPMode ( )

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

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

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

◆ getMaxVersion()

ilObjFile::getMaxVersion ( )

Implements ilObjFileImplementationInterface.

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

References $max_version.

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

◆ getMode()

ilObjFile::getMode ( )

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

References $mode.

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

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

◆ getOnClickMode()

ilObjFile::getOnClickMode ( )

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

References $on_click_mode.

Referenced by getArrayForDatabase().

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

◆ getPageCount()

ilObjFile::getPageCount ( )

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

References $page_count.

Referenced by doCloneObject(), and getArrayForDatabase().

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

◆ getPresentationTitle()

ilObjFile::getPresentationTitle ( )

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

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

◆ getResourceId()

ilObjFile::getResourceId ( )

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

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

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

◆ getStorageID()

ilObjFile::getStorageID ( )

Implements ilObjFileImplementationInterface.

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

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

◆ getUploadFile()

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

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

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

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

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

◆ getVersions()

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

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

Referenced by ilObjFileComponentBuilder\buildConfirmDeleteSpecificVersionsModal().

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

◆ handleChangedObjectTitle()

ilObjFile::handleChangedObjectTitle ( string  $new_title)

Implements ilObjFileImplementationInterface.

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

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

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

◆ hasRating()

ilObjFile::hasRating ( )

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

References $rating.

Referenced by getArrayForDatabase().

339  : bool
340  {
341  return $this->rating;
342  }
+ 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  $this->file_info = $is_ref_id ? $repository->getByRefId($id) : $repository->getByObjectId($id);
94  }
$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 102 of file class.ilObjFile.php.

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

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

102  : void
103  {
104  if ($this->resource_id && ($id = $this->manager->find(
105  $this->resource_id
106  )) instanceof ResourceIdentification) {
107  $resource = $this->manager->getResource($id);
108  $this->implementation = new ilObjFileImplementationStorage($resource);
109  $this->max_version = $resource->getMaxRevision(false);
110  $this->version = $resource->getCurrentRevision()->getVersionNumber();
111  }
112  $this->initFileInfo($this->getId(), false);
113  }
Class ilObjFileImplementationStorage.
initFileInfo(int $id, bool $is_ref_id)
$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 578 of file class.ilObjFile.php.

578  : void
579  {
580  $this->type = self::OBJECT_TYPE;
581  }

◆ isHidden()

ilObjFile::isHidden ( )
Deprecated:

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

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

624  : bool
625  {
626  return ilObjFileAccess::_isFileHidden($this->getTitle());
627  }
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 593 of file class.ilObjFile.php.

References ILIAS\Repository\upload().

Referenced by getUploadFile().

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

References null.

588  : null
589  {
590  return null;
591  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ replaceWithStream()

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

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

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

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

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

References getResourceId(), and updateObjectFromRevision().

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

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

652  : void
653  {
654  // increment file download count by one.
655  $this->setAmountOfDownloads($this->getAmountOfDownloads() + 1);
656  $this->update();
657  $info = (new ilObjFileInfoRepository())->getByObjectId($this->getId());
658  $this->implementation->sendFile($a_hist_entry_id, $info->shouldDeliverInline());
659  }
setAmountOfDownloads(int $amount)
$info
Definition: entry_point.php:21
+ Here is the call graph for this function:

◆ setAction()

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

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

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

◆ setAmountOfDownloads()

ilObjFile::setAmountOfDownloads ( int  $amount)

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

Referenced by sendFile().

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

◆ setCopyrightID()

ilObjFile::setCopyrightID ( ?string  $copyright_id)

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

References $copyright_id.

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

◆ setFileName()

ilObjFile::setFileName ( string  $a_name)

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

Referenced by updateObjectFromRevision().

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

◆ setFileSize()

ilObjFile::setFileSize ( int  $a_size)
Returns
never

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

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

◆ setFileType()

ilObjFile::setFileType ( string  $a_type)
Returns
never

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

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

◆ setImportantInfo()

ilObjFile::setImportantInfo ( string  $a_important_info)

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

References null.

254  : void
255  {
256  $this->important_info = empty($a_important_info) ? null : $a_important_info;
257  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ setMaxVersion()

ilObjFile::setMaxVersion ( int  $a_max_version)
Returns
never

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

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

◆ setMode()

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

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

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

◆ setOnclickMode()

ilObjFile::setOnclickMode ( int  $on_click_mode)

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

References $on_click_mode.

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

◆ setPageCount()

ilObjFile::setPageCount ( int  $page_count)

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

References $page_count.

Referenced by appendUpload(), and replaceWithUpload().

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

◆ setRating()

ilObjFile::setRating ( bool  $a_value)

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

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

◆ setResourceId()

ilObjFile::setResourceId ( ?string  $resource_id)

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

References $resource_id.

Referenced by appendStream(), and appendUpload().

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

◆ setVersion()

ilObjFile::setVersion ( int  $a_version)

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

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

◆ stripTitleOfFileExtension()

ilObjFile::stripTitleOfFileExtension ( string  $a_title)

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

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

◆ updateObjectFromCurrentRevision()

ilObjFile::updateObjectFromCurrentRevision ( )

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

References updateObjectFromRevision().

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

◆ updateObjectFromRevision()

ilObjFile::updateObjectFromRevision ( Revision  $r)
private

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

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

Referenced by getAction().

◆ $amount_of_downloads

int ilObjFile::$amount_of_downloads = 0
protected

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

Referenced by getAmountOfDownloads().

◆ $copyright_id

string ilObjFile::$copyright_id = null
protected

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

Referenced by getCopyrightID(), and setCopyrightID().

◆ $database

ilDBInterface ilObjFile::$database
private

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

◆ $file_info

ilObjFileInfo ilObjFile::$file_info
protected

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

◆ $filename

string ilObjFile::$filename = ''
protected

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

◆ $filesize

int ilObjFile::$filesize
protected

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

◆ $filetype

string ilObjFile::$filetype = ''
protected

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

◆ $implementation

ilObjFileImplementationInterface ilObjFile::$implementation
protected

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

◆ $important_info

string ilObjFile::$important_info = null
protected

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

Referenced by getImportantInfo().

◆ $log

ilLogger ilObjFile::$log
protected

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

◆ $manager

Manager ilObjFile::$manager
protected

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

◆ $max_version

int ilObjFile::$max_version = 0
protected

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

Referenced by getMaxVersion().

◆ $mode

string ilObjFile::$mode = self::MODE_OBJECT

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

Referenced by getMode().

◆ $on_click_mode

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

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

Referenced by getOnClickMode(), and setOnclickMode().

◆ $page_count

int ilObjFile::$page_count = 0
protected

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

Referenced by getPageCount(), and setPageCount().

◆ $rating

bool ilObjFile::$rating = false
protected

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

Referenced by hasRating().

◆ $resource_id

string ilObjFile::$resource_id = null
protected

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

Referenced by setResourceId().

◆ $stakeholder

ilObjFileStakeholder ilObjFile::$stakeholder
protected

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

◆ $upload

FileUpload ilObjFile::$upload
protected

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

◆ $version

int ilObjFile::$version = 0
protected

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

◆ CLICK_MODE_DOWNLOAD

◆ CLICK_MODE_INFOPAGE

const ilObjFile::CLICK_MODE_INFOPAGE = 2

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

Referenced by ilObjFileGUI\initPropertiesForm().

◆ MODE_FILELIST

const ilObjFile::MODE_FILELIST = "filelist"

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

Referenced by ilModulesFileTest\testAppendStream().

◆ MODE_OBJECT

const ilObjFile::MODE_OBJECT = "object"

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

◆ OBJECT_TYPE


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