ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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:22
__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 148 of file class.ilObjFile.php.

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

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

References ensureSuffix(), and extractSuffixFromFilename().

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

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

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

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

◆ beforeUpdate()

ilObjFile::beforeUpdate ( )
protected

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

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

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

References appendSuffixToTitle().

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

◆ clearDataDirectory()

ilObjFile::clearDataDirectory ( )

Deprecated:

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

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

◆ deleteVersions()

ilObjFile::deleteVersions (   $a_hist_entry_ids = null)

Deprecated:

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

References getResourceId(), and updateObjectFromRevision().

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

◆ directDownload()

ilObjFile::directDownload ( )

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

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

◆ doCloneObject()

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

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

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

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

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

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

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

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

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

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

◆ doUpdate()

ilObjFile::doUpdate ( )
protected

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

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

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

663  : void
664  {
665  //
666  }

◆ getAction()

ilObjFile::getAction ( )
Deprecated:

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

References $action.

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

◆ getAmountOfDownloads()

ilObjFile::getAmountOfDownloads ( )

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

References $amount_of_downloads.

Referenced by getArrayForDatabase(), and sendFile().

399  : int
400  {
402  }
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 562 of file class.ilObjFile.php.

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

Referenced by doUpdate().

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

◆ getCopyrightID()

ilObjFile::getCopyrightID ( )

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

References $copyright_id.

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

◆ getDirectory()

ilObjFile::getDirectory (   $a_version = 0)

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

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

◆ getDownloadFilename()

ilObjFile::getDownloadFilename ( )

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

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

◆ getFile()

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

Implements ilObjFileImplementationInterface.

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

References initImplementation().

Referenced by ilCollectWorkspaceFilesJob\getFileDirs().

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

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

◆ getFileName()

ilObjFile::getFileName ( )

Implements ilObjFileImplementationInterface.

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

Referenced by getArrayForDatabase().

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

◆ getFileSize()

ilObjFile::getFileSize ( )

Implements ilObjFileImplementationInterface.

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

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

◆ getFileType()

ilObjFile::getFileType ( )

Implements ilObjFileImplementationInterface.

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

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

◆ getImportantInfo()

ilObjFile::getImportantInfo ( )

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

References $important_info.

Referenced by getArrayForDatabase().

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

◆ getLPMode()

ilObjFile::getLPMode ( )

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

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

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

◆ getMaxVersion()

ilObjFile::getMaxVersion ( )

Implements ilObjFileImplementationInterface.

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

References $max_version.

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

◆ getMode()

ilObjFile::getMode ( )

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

References $mode.

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

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

◆ getOnClickMode()

ilObjFile::getOnClickMode ( )

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

References $on_click_mode.

Referenced by getArrayForDatabase().

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

◆ getPageCount()

ilObjFile::getPageCount ( )

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

References $page_count.

Referenced by doCloneObject(), and getArrayForDatabase().

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

◆ getPresentationTitle()

ilObjFile::getPresentationTitle ( )

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

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

◆ getResourceId()

ilObjFile::getResourceId ( )

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

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

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

◆ getStorageID()

ilObjFile::getStorageID ( )

Implements ilObjFileImplementationInterface.

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

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

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

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

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

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

◆ getVersions()

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

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

Referenced by ilObjFileComponentBuilder\buildConfirmDeleteSpecificVersionsModal().

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

◆ handleChangedObjectTitle()

ilObjFile::handleChangedObjectTitle ( string  $new_title)

Implements ilObjFileImplementationInterface.

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

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

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

◆ hasRating()

ilObjFile::hasRating ( )

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

References $rating.

Referenced by getArrayForDatabase().

338  : bool
339  {
340  return $this->rating;
341  }
+ 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:23
+ Here is the caller graph for this function:

◆ initImplementation()

ilObjFile::initImplementation ( )
protected

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

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

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

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

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

◆ isHidden()

ilObjFile::isHidden ( )
Deprecated:

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

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

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

References ILIAS\Repository\upload().

Referenced by getUploadFile().

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

References null.

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

◆ replaceWithStream()

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

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

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

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

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

References getResourceId(), and updateObjectFromRevision().

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

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

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

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

◆ setAmountOfDownloads()

ilObjFile::setAmountOfDownloads ( int  $amount)

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

Referenced by sendFile().

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

◆ setCopyrightID()

ilObjFile::setCopyrightID ( ?string  $copyright_id)

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

References $copyright_id.

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

◆ setFileName()

ilObjFile::setFileName ( string  $a_name)

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

Referenced by updateObjectFromRevision().

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

◆ setFileSize()

ilObjFile::setFileSize ( int  $a_size)
Returns
never

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

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

◆ setFileType()

ilObjFile::setFileType ( string  $a_type)
Returns
never

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

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

◆ setImportantInfo()

ilObjFile::setImportantInfo ( string  $a_important_info)

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

References null.

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

◆ setMaxVersion()

ilObjFile::setMaxVersion ( int  $a_max_version)
Returns
never

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

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

◆ setMode()

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

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

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

◆ setOnclickMode()

ilObjFile::setOnclickMode ( int  $on_click_mode)

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

References $on_click_mode.

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

◆ setPageCount()

ilObjFile::setPageCount ( int  $page_count)

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

References $page_count.

Referenced by appendUpload(), and replaceWithUpload().

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

◆ setRating()

ilObjFile::setRating ( bool  $a_value)

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

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

◆ setResourceId()

ilObjFile::setResourceId ( ?string  $resource_id)

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

References $resource_id.

Referenced by appendStream(), and appendUpload().

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

◆ setVersion()

ilObjFile::setVersion ( int  $a_version)

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

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

◆ stripTitleOfFileExtension()

ilObjFile::stripTitleOfFileExtension ( string  $a_title)

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

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

◆ updateObjectFromCurrentRevision()

ilObjFile::updateObjectFromCurrentRevision ( )

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

References updateObjectFromRevision().

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

◆ updateObjectFromRevision()

ilObjFile::updateObjectFromRevision ( Revision  $r)
private

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

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