ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($a_id=0, $a_call_by_reference=true) | |
ilObjFile constructor. More... | |
initType () | |
createProperties ($a_upload=false) | |
The basic properties of a file object are stored in table object_data. More... | |
setNoMetaDataCreation ($a_status) | |
getDirectory ($a_version=0) | |
createDirectory () | |
raiseUploadError ($a_raise=true) | |
replaceFile ($a_upload_file, $a_filename) | |
addFileVersion ($a_upload_file, $a_filename) | |
copy ($a_source, $a_destination) | |
copy file More... | |
clearDataDirectory () | |
clear data directory More... | |
deleteVersions ($a_hist_entry_ids=null) | |
Deletes the specified history entries or all entries if no ids are specified. More... | |
setFileName ($a_name) | |
getFileName () | |
setFileType ($a_type) | |
getFileType () | |
setFileSize ($a_size) | |
getFileSize () | |
setAction ($a_action) | |
getAction () | |
setRollbackVersion ($a_rollback_version) | |
getRollbackVersion () | |
setRollbackUserId ($a_rollback_user_id) | |
getRollbackUserId () | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. More... | |
getFile ($a_hist_entry_id=null) | |
setVersion ($a_version) | |
getVersion () | |
setMaxVersion ($a_max_version) | |
getMaxVersion () | |
setMode ($a_mode) | |
mode is object or filelist More... | |
getMode () | |
mode is object or filelist More... | |
determineFileSize ($a_hist_entry_id=null) | |
Determine File Size. More... | |
getFileExtension () | |
Returns the extension of the file name converted to lower-case. More... | |
isInline () | |
Returns true, if this file should be displayed inline in a browser window. More... | |
isHidden () | |
Returns true, if this file should be hidden in the repository view. More... | |
guessFileType ($a_file="") | |
Guesses the file type based on the current values returned by getFileType() and getFileExtension(). More... | |
export ($a_target_dir) | |
export files of object to target directory note: target directory must be the export target directory, "/objects/il_<inst>_file_<file_id>/..." will be appended to this directory More... | |
getUsages () | |
get all usages of file object More... | |
getXMLZip () | |
addNewsNotification ($a_lang_var) | |
initFileStorage () | |
init file storage object More... | |
storeUnzipedFile ($a_upload_file, $a_filename) | |
storeUnzipedFile More... | |
checkFileExtension ($new_filename, $new_title) | |
Check if the file extension does still exist after an update of the title. More... | |
getVersions ($version_ids=null) | |
Gets the file versions for this object. More... | |
getSpecificVersion ($version_id) | |
Gets a specific file version. More... | |
rollback ($version_id) | |
Makes the specified version the current one and returns theSummary of rollbackVersion. More... | |
compareVersions ($v1, $v2) | |
Compares two file versions. More... | |
setRating ($a_value) | |
hasRating () | |
getPageCount () | |
setPageCount ($page_count) | |
Public Member Functions inherited from ilObject2 | |
__construct ($a_id=0, $a_reference=true) | |
Constructor public. More... | |
withReferences () | |
read () | |
Read data from db. More... | |
getId () | |
setId ($a_id) | |
setRefId ($a_id) | |
getRefId () | |
getType () | |
setType ($a_type) | |
getPresentationTitle () | |
getTitle () | |
getUntranslatedTitle () | |
setTitle ($a_title) | |
getDescription () | |
setDescription ($a_desc) | |
getLongDescription () | |
getImportId () | |
setImportId ($a_import_id) | |
getOwner () | |
getOwnerName () | |
setOwner ($a_owner) | |
getCreateDate () | |
getLastUpdateDate () | |
create ($a_clone_mode=false) | |
update () | |
MDUpdateListener ($a_element) | |
createMetaData () | |
updateMetaData () | |
deleteMetaData () | |
updateOwner () | |
putInTree ($a_parent_ref) | |
setPermissions ($a_parent_ref) | |
createReference () | |
countReferences () | |
delete () | |
initDefaultRoles () | |
setRegisterMode ($a_bool) | |
isUserRegistered ($a_user_id=0) | |
requireRegistration () | |
appendCopyInfo ($a_target_id, $a_copy_id) | |
cloneMetaData ($target_obj) | |
cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false) | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Public Member Functions inherited from ilObject | |
__construct ($a_id=0, $a_reference=true) | |
Constructor public. More... | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) More... | |
read () | |
read object data from db into object More... | |
getId () | |
get object id public More... | |
setId ($a_id) | |
set object id public More... | |
setRefId ($a_id) | |
set reference id public More... | |
getRefId () | |
get reference id public More... | |
getType () | |
get object type public More... | |
setType ($a_type) | |
set object type public More... | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions More... | |
getTitle () | |
get object title public More... | |
getUntranslatedTitle () | |
get untranslated object title public More... | |
setTitle ($a_title) | |
set object title More... | |
getDescription () | |
get object description More... | |
setDescription ($a_desc) | |
set object description More... | |
getLongDescription () | |
get object long description (stored in object_description) More... | |
getImportId () | |
get import id More... | |
setImportId ($a_import_id) | |
set import id More... | |
setOfflineStatus ($a_status) | |
Set offline status. More... | |
getOfflineStatus () | |
Get offline status. More... | |
supportsOfflineHandling () | |
Check whether object supports offline handling. More... | |
getOwner () | |
get object owner More... | |
getOwnerName () | |
setOwner ($a_owner) | |
set object owner More... | |
getCreateDate () | |
get create date public More... | |
getLastUpdateDate () | |
get last update date public More... | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. More... | |
create () | |
create More... | |
update () | |
update object in db More... | |
MDUpdateListener ($a_element) | |
Meta data update listener. More... | |
createMetaData () | |
create meta data entry More... | |
updateMetaData () | |
update meta data entry More... | |
deleteMetaData () | |
delete meta data entry More... | |
updateOwner () | |
update owner of object in db More... | |
putInTree ($a_parent_ref) | |
maybe this method should be in tree object!? More... | |
setPermissions ($a_parent_ref) | |
set permissions of object More... | |
setParentRolePermissions ($a_parent_ref) | |
Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More... | |
createReference () | |
creates reference for object More... | |
countReferences () | |
count references of object 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 If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More... | |
applyDidacticTemplate ($a_tpl_id) | |
Apply template. More... | |
setRegisterMode ($a_bool) | |
isUserRegistered ($a_user_id=0) | |
requireRegistration () | |
getXMLZip () | |
getHTMLDirectory () | |
appendCopyInfo ($a_target_id, $a_copy_id) | |
Prepend Copy info if object with same name exists in that container. More... | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. More... | |
cloneMetaData ($target_obj) | |
Copy meta data. More... | |
getPossibleSubObjects ($a_filter=true) | |
get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More... | |
Static Public Member Functions | |
static | _writeFileType ($a_id, $a_format) |
static | _lookupFileName ($a_id) |
static | _lookupFileSize ($a_id) |
Lookups the file size of the file in bytes. More... | |
static | _lookupVersion ($a_id) |
lookup version More... | |
static | _deleteAllUsages ($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-") |
static delete all usages of More... | |
static | _saveUsage ($a_file_id, $a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-") |
save usage More... | |
static | _getFilesOfObject ($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-") |
get all files of an object More... | |
static | _lookupAbsolutePath ($obj_id, $a_version=null) |
Static Public Member Functions inherited from ilObject2 | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _lookupOwnerName ($a_owner_id) |
static | _getIdForImportId ($a_import_id) |
static | _getAllReferences ($a_id) |
static | _lookupTitle ($a_id) |
static | _lookupOwner ($a_id) |
static | _getIdsForTitle ($title, $type='', $partialmatch=false) |
static | _lookupDescription ($a_id) |
static | _lookupLastUpdate ($a_id, $a_as_string=false) |
static | _getLastUpdateOfObjects ($a_objs) |
static | _lookupObjId ($a_id) |
static | _setDeletedDate ($a_ref_id) |
static | _resetDeletedDate ($a_ref_id) |
static | _lookupDeletedDate ($a_ref_id) |
static | _writeTitle ($a_obj_id, $a_title) |
static | _writeDescription ($a_obj_id, $a_desc) |
static | _writeImportId ($a_obj_id, $a_import_id) |
static | _lookupType ($a_id, $a_reference=false) |
static | _isInTrash ($a_ref_id) |
static | _hasUntrashedReference ($a_obj_id) |
static | _lookupObjectId ($a_ref_id) |
static | _getObjectsDataForType ($a_type, $a_omit_trash=false) |
static | _exists ($a_id, $a_reference=false, $a_type=null) |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
static | _prepareCloneSelection ($a_ref_ids, $new_type, $a_show_path=true) |
static | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Static Public Member Functions inherited from ilObject | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _lookupImportId ($a_obj_id) |
static | _lookupOwnerName ($a_owner_id) |
lookup owner name for owner id More... | |
static | _getIdForImportId ($a_import_id) |
get current object id for import id (static) More... | |
static | _getAllReferences ($a_id) |
get all reference ids of object More... | |
static | _lookupTitle ($a_id) |
lookup object title More... | |
static | lookupOfflineStatus ($a_obj_id) |
Lookup offline status using objectDataCache. More... | |
static | _lookupOwner ($a_id) |
lookup object owner More... | |
static | _getIdsForTitle ($title, $type='', $partialmatch=false) |
static | _lookupDescription ($a_id) |
lookup object description More... | |
static | _lookupLastUpdate ($a_id, $a_as_string=false) |
lookup last update More... | |
static | _getLastUpdateOfObjects ($a_objs) |
Get last update for a set of media objects. More... | |
static | _lookupObjId ($a_id) |
static | _setDeletedDate ($a_ref_id) |
only called in ilTree::saveSubTree More... | |
static | setDeletedDates ($a_ref_ids) |
Set deleted date. More... | |
static | _resetDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _lookupDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _writeTitle ($a_obj_id, $a_title) |
write title to db (static) More... | |
static | _writeDescription ($a_obj_id, $a_desc) |
write description to db (static) More... | |
static | _writeImportId ($a_obj_id, $a_import_id) |
write import id to db (static) More... | |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type More... | |
static | _isInTrash ($a_ref_id) |
checks wether object is in trash More... | |
static | _hasUntrashedReference ($a_obj_id) |
checks wether an object has at least one reference that is not in trash More... | |
static | _lookupObjectId ($a_ref_id) |
lookup object id More... | |
static | _getObjectsDataForType ($a_type, $a_omit_trash=false) |
get all objects of a certain type More... | |
static | _exists ($a_id, $a_reference=false, $a_type=null) |
checks if an object exists in object_data More... | |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
Get objects by type. More... | |
static | _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true) |
Prepare copy wizard object selection. More... | |
static | collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0) |
Collect deletion dependencies. More... | |
static | getDeletionDependencies ($a_obj_id) |
Get deletion dependencies. More... | |
static | getLongDescriptions (array $a_obj_ids) |
Get long description data. More... | |
static | getAllOwnedRepositoryObjects ($a_user_id) |
Get all ids of objects user owns. More... | |
static | fixMissingTitles ($a_type, array &$a_obj_title_map) |
Try to fix missing object titles. More... | |
static | _lookupCreationDate ($a_id) |
Lookup creation date. More... | |
static | hasAutoRating ($a_type, $a_ref_id) |
Check if auto rating is active for parent group/course. More... | |
Data Fields | |
const | MODE_FILELIST = "filelist" |
const | MODE_OBJECT = "object" |
$raise_upload_error | |
$mode = self::MODE_OBJECT | |
Data Fields inherited from ilObject | |
const | TITLE_LENGTH = 255 |
max length of object title More... | |
const | DESC_LENGTH = 128 |
$lng | |
$id | |
$ref_id | |
$type | |
$title | |
$untranslatedTitle | |
$desc | |
$long_desc | |
$owner | |
$create_date | |
$last_update | |
$import_id | |
$register = false | |
$referenced | |
$objectList | |
$max_title | |
$max_desc | |
$add_dots | |
Protected Member Functions | |
doCreate ($a_upload=false) | |
create object More... | |
beforeCreateMetaData () | |
beforeUpdateMetaData () | |
doCreateMetaData () | |
create file object meta data More... | |
beforeMDUpdateListener ($a_element) | |
doMDUpdateListener ($a_element) | |
doRead () | |
beforeUpdate () | |
doUpdate () | |
doUpdateMetaData () | |
update meta data More... | |
doCloneObject ($a_new_obj, $a_target_id, $a_copy_id=0) | |
Clone. More... | |
beforeDelete () | |
doDelete () | |
updateWithVersion ($version) | |
Updates the file object with the specified file version. More... | |
createPreview ($force=false) | |
Creates a preview for the file object. More... | |
deletePreview () | |
Deletes the preview of the file object. More... | |
Protected Member Functions inherited from ilObject2 | |
initType () | |
doRead () | |
doCreate () | |
beforeCreate () | |
doUpdate () | |
beforeUpdate () | |
doMDUpdateListener ($a_element) | |
beforeMDUpdateListener ($a_element) | |
doCreateMetaData () | |
beforeCreateMetaData () | |
doUpdateMetaData () | |
beforeUpdateMetaData () | |
doDelete () | |
beforeDelete () | |
doCloneObject ($new_obj, $a_target_id, $a_copy_id=null) | |
beforeCloneObject () | |
Static Protected Member Functions | |
static | handleQuotaUpdate (ilObjFile $a_file) |
Protected Attributes | |
$no_meta_data_creation | |
$filename = '' | |
$filetype = '' | |
$filemaxsize = "20000000" | |
$filesize | |
$page_count = 0 | |
$rating = false | |
$log = null | |
$version = 1 | |
$max_version = 1 | |
$action = null | |
$rollback_version = null | |
$rollback_user_id = null | |
Protected Attributes inherited from ilObject | |
$objDefinition | |
$db | |
$log | |
$error | |
$tree | |
$app_event_handler | |
$rbacadmin | |
$rbacreview | |
Private Member Functions | |
parseInfoParams ($entry) | |
Parses the info parameters ("info_params") of the specified history entry. More... | |
getArrayForDatabase ($file_id=0) | |
Private Attributes | |
$file_storage = null | |
ilObjFile::__construct | ( | $a_id = 0 , |
|
$a_call_by_reference = true |
|||
) |
ilObjFile constructor.
int | $a_id | ID of the object, ref_id or obj_id possible |
bool | $a_call_by_reference | defines the $a_id a ref_id |
Definition at line 97 of file class.ilObjFile.php.
References ilObject2\getId(), ilLoggerFactory\getLogger(), and initFileStorage().
|
static |
static delete all usages of
Definition at line 1070 of file class.ilObjFile.php.
References $a_type, $DIC, $ilDB, and $row.
Referenced by ilPCFileList\beforePageDelete(), and ilPCFileList\saveFileUsage().
|
static |
get all files of an object
string | $a_type | object type (e.g. "lm:pg") |
int | $a_id | object id |
Definition at line 1157 of file class.ilObjFile.php.
References $a_type, $DIC, $ilDB, and $ret.
Referenced by ilPCFileList\afterPageUpdate(), ilCOPageHTMLExport\collectPageElements(), ilPageObjectGUI\downloadFile(), ilObjGlossary\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLPages(), ilPageObject\getLastUpdateOfIncludedElements(), and ilCOPageExporter\getXmlExportHeadDependencies().
|
static |
$obj_id | ||
null | $a_version |
Definition at line 1273 of file class.ilObjFile.php.
References $s.
Referenced by ilFolderDownloadBackgroundTaskHandler\copyFile(), ilContainerGUI\copyFile(), and ilObjFolder\recurseFolder().
|
static |
$a_id |
Definition at line 779 of file class.ilObjFile.php.
References $DIC, $ilDB, $r, $row, ilDBConstants\FETCHMODE_OBJECT, and ilUtil\stripSlashes().
Referenced by ilSCORM2004PageGUI\setDefaultLinkXml(), and ilFilePreviewRenderer\supports().
|
static |
Lookups the file size of the file in bytes.
Definition at line 795 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupFileSize().
Referenced by ilPageObject\addFileSizes(), and ilObjFileGUI\infoScreenForward().
|
static |
lookup version
Definition at line 806 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupVersion().
|
static |
save usage
Definition at line 1102 of file class.ilObjFile.php.
References $a_type, $DIC, $ilDB, and ilObject\_lookupType().
Referenced by ilPCFileList\saveFileUsage().
|
static |
Definition at line 762 of file class.ilObjFile.php.
References $DIC, $ilDB, and $res.
Referenced by doMDUpdateListener().
ilObjFile::addFileVersion | ( | $a_upload_file, | |
$a_filename | |||
) |
$a_upload_file | |
$a_filename |
Definition at line 414 of file class.ilObjFile.php.
References $result, ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), getMaxVersion(), and getVersion().
ilObjFile::addNewsNotification | ( | $a_lang_var | ) |
Definition at line 1196 of file class.ilObjFile.php.
References $DIC, $ilUser, ilObject2\getDescription(), ilObject2\getId(), ilObject2\getType(), isHidden(), NEWS_NOTICE, and NEWS_USERS.
Referenced by addFileVersion(), createProperties(), replaceFile(), and rollback().
|
protected |
Definition at line 194 of file class.ilObjFile.php.
|
protected |
Definition at line 1000 of file class.ilObjFile.php.
References $DIC, $ilDB, and getUsages().
|
protected |
Definition at line 223 of file class.ilObjFile.php.
References ilObject\$title, checkFileExtension(), getFileName(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Definition at line 527 of file class.ilObjFile.php.
References getMode(), and ilObject2\updateMetaData().
|
protected |
Definition at line 200 of file class.ilObjFile.php.
ilObjFile::checkFileExtension | ( | $new_filename, | |
$new_title | |||
) |
Check if the file extension does still exist after an update of the title.
Definition at line 1288 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and getFileName().
Referenced by beforeMDUpdateListener(), and updateWithVersion().
ilObjFile::clearDataDirectory | ( | ) |
clear data directory
Definition at line 440 of file class.ilObjFile.php.
References createDirectory(), ilUtil\delDir(), and getDirectory().
Referenced by deleteVersions().
ilObjFile::compareVersions | ( | $v1, | |
$v2 | |||
) |
Compares two file versions.
array | $v1 | First file version to compare. |
array | $v2 | Second file version to compare. |
Definition at line 1485 of file class.ilObjFile.php.
ilObjFile::copy | ( | $a_source, | |
$a_destination | |||
) |
copy file
Definition at line 431 of file class.ilObjFile.php.
References getDirectory().
Referenced by rollback().
ilObjFile::createDirectory | ( | ) |
Definition at line 293 of file class.ilObjFile.php.
References getDirectory(), and ilUtil\makeDirParents().
Referenced by clearDataDirectory().
|
protected |
Creates a preview for the file object.
bool | $force | true, to force the creation of the preview; false, to create the preview only if the file is newer. |
Definition at line 1581 of file class.ilObjFile.php.
References ilPreview\createPreview(), and getMode().
Referenced by addFileVersion(), raiseUploadError(), replaceFile(), storeUnzipedFile(), and updateWithVersion().
ilObjFile::createProperties | ( | $a_upload = false | ) |
The basic properties of a file object are stored in table object_data.
This is not sufficient for a file object. Therefore we create additional properties in table file_data. This method has been put into a separate operation, to allow a WebDAV Null resource (class.ilObjNull.php) to become a file object.
Definition at line 137 of file class.ilObjFile.php.
References $_GET, $DIC, $metadata, ilHistory\_createEntry(), ilNewsItem\_getDefaultVisibilityForRefId(), ilBlockSetting\_write(), addNewsNotification(), ilObject2\createMetaData(), ilLogLevel\DEBUG, getArrayForDatabase(), ilStr\getBytesForString(), getFileName(), getFileSize(), getFileType(), ilObject2\getId(), getMode(), getVersion(), and initFileStorage().
Referenced by doCreate().
|
protected |
Deletes the preview of the file object.
Definition at line 1596 of file class.ilObjFile.php.
References ilPreview\deletePreview(), ilObject2\getId(), and getMode().
Referenced by doDelete().
ilObjFile::deleteVersions | ( | $a_hist_entry_ids = null | ) |
Deletes the specified history entries or all entries if no ids are specified.
array | $a_hist_entry_ids | The ids of the entries to delete or null to delete all entries |
Definition at line 452 of file class.ilObjFile.php.
References $index, $version, ilHistory\_removeEntriesForObject(), ilHistory\_removeEntryByHistoryID(), clearDataDirectory(), ilUtil\delDir(), getDirectory(), ilObject2\getId(), getMaxVersion(), getVersion(), getVersions(), and updateWithVersion().
ilObjFile::determineFileSize | ( | $a_hist_entry_id = null | ) |
Determine File Size.
Definition at line 817 of file class.ilObjFile.php.
References $data, $DIC, $s, ilHistory\_getEntryByHistoryID(), ilFileDelivery\DISP_ATTACHMENT, ilFileDelivery\DISP_INLINE, getDirectory(), getFileName(), ilObject2\getTitle(), ilFileUtils\getValidFilename(), getVersion(), guessFileType(), isInline(), parseInfoParams(), and setFileSize().
Referenced by updateWithVersion().
|
protected |
Clone.
public
object | clone |
int | target id |
int | copy id |
Definition at line 964 of file class.ilObjFile.php.
References $DIC, $ilDB, ilHistory\_copyEntriesForObject(), ilObject2\cloneMetaData(), ilPreview\copyPreviews(), getArrayForDatabase(), getDirectory(), ilObject2\getId(), and ilUtil\rCopy().
|
protected |
create object
bool | upload mode (if enabled no entries in file_data will be done) |
Definition at line 124 of file class.ilObjFile.php.
References createProperties().
|
protected |
create file object meta data
Definition at line 209 of file class.ilObjFile.php.
References $format, getFileSize(), getFileType(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Definition at line 1015 of file class.ilObjFile.php.
References $DIC, $ilDB, ilHistory\_removeEntriesForObject(), ilUtil\delDir(), ilObject2\deleteMetaData(), deletePreview(), getDirectory(), ilObject2\getId(), and getMode().
|
protected |
Definition at line 240 of file class.ilObjFile.php.
References ilObject\$id, _writeFileType(), ilObject2\getId(), ilObject2\getType(), and setFileType().
|
protected |
Definition at line 506 of file class.ilObjFile.php.
References $DIC, $r, $row, ilObject2\getId(), initFileStorage(), setFileName(), setFileSize(), setFileType(), setMaxVersion(), setMode(), setPageCount(), setRating(), and setVersion().
|
protected |
Definition at line 538 of file class.ilObjFile.php.
References $DIC, getArrayForDatabase(), ilObject2\getId(), and getVersion().
Referenced by raiseUploadError().
|
protected |
update meta data
Definition at line 568 of file class.ilObjFile.php.
References $format, getFileSize(), getFileType(), ilObject2\getId(), and ilObject2\getType().
ilObjFile::export | ( | $a_target_dir | ) |
export files of object to target directory note: target directory must be the export target directory, "/objects/il_<inst>_file_<file_id>/..." will be appended to this directory
string | $a_target_dir | target directory |
Definition at line 1052 of file class.ilObjFile.php.
References getDirectory(), ilObject2\getId(), getVersion(), ilUtil\makeDir(), and ilUtil\rCopy().
ilObjFile::getAction | ( | ) |
Definition at line 649 of file class.ilObjFile.php.
References $action.
|
private |
int | $file_id | (part of bugfix mantis 26131) |
Definition at line 1649 of file class.ilObjFile.php.
References getFileName(), getFileSize(), getFileType(), ilObject2\getId(), getMaxVersion(), getMode(), getPageCount(), getVersion(), and hasRating().
Referenced by createProperties(), doCloneObject(), and doUpdate().
ilObjFile::getDirectory | ( | $a_version = 0 | ) |
int | $a_version |
Definition at line 273 of file class.ilObjFile.php.
References initFileStorage().
Referenced by clearDataDirectory(), copy(), createDirectory(), deleteVersions(), determineFileSize(), doCloneObject(), doDelete(), export(), getFile(), getXMLZip(), raiseUploadError(), rollback(), and storeUnzipedFile().
ilObjFile::getDiskUsage | ( | ) |
Gets the disk usage of the object in bytes.
public
Definition at line 685 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupDiskUsage().
Referenced by handleQuotaUpdate().
ilObjFile::getFile | ( | $a_hist_entry_id = null | ) |
Definition at line 694 of file class.ilObjFile.php.
References $data, ilHistory\_getEntryByHistoryID(), getDirectory(), getFileName(), getVersion(), and parseInfoParams().
ilObjFile::getFileExtension | ( | ) |
Returns the extension of the file name converted to lower-case.
e.g. returns 'pdf' for 'document.pdf'.
Definition at line 900 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and ilObject2\getTitle().
Referenced by guessFileType().
ilObjFile::getFileName | ( | ) |
Definition at line 604 of file class.ilObjFile.php.
References $filename.
Referenced by beforeMDUpdateListener(), checkFileExtension(), createProperties(), determineFileSize(), getArrayForDatabase(), getFile(), and getXMLZip().
ilObjFile::getFileSize | ( | ) |
Definition at line 637 of file class.ilObjFile.php.
References $filesize.
Referenced by createProperties(), doCreateMetaData(), doUpdateMetaData(), and getArrayForDatabase().
ilObjFile::getFileType | ( | ) |
Definition at line 622 of file class.ilObjFile.php.
References $filetype.
Referenced by createProperties(), doCreateMetaData(), doUpdateMetaData(), getArrayForDatabase(), and guessFileType().
ilObjFile::getMaxVersion | ( | ) |
Definition at line 734 of file class.ilObjFile.php.
References $max_version.
Referenced by addFileVersion(), deleteVersions(), getArrayForDatabase(), raiseUploadError(), replaceFile(), and rollback().
ilObjFile::getMode | ( | ) |
mode is object or filelist
Definition at line 756 of file class.ilObjFile.php.
References $mode.
Referenced by beforeUpdate(), createPreview(), createProperties(), deletePreview(), doDelete(), and getArrayForDatabase().
ilObjFile::getPageCount | ( | ) |
Definition at line 1629 of file class.ilObjFile.php.
References $page_count.
Referenced by getArrayForDatabase().
ilObjFile::getRollbackUserId | ( | ) |
ilObjFile::getRollbackVersion | ( | ) |
ilObjFile::getSpecificVersion | ( | $version_id | ) |
Gets a specific file version.
int | $version_id | The version id to get. |
Definition at line 1361 of file class.ilObjFile.php.
References PHPMailer\PHPMailer\$params, $version, ilHistory\_getEntryByHistoryID(), and parseInfoParams().
Referenced by rollback().
ilObjFile::getUsages | ( | ) |
get all usages of file object
Definition at line 1127 of file class.ilObjFile.php.
References $DIC, $ilDB, $ret, and ilObject2\getId().
Referenced by beforeDelete(), and handleQuotaUpdate().
ilObjFile::getVersion | ( | ) |
Definition at line 722 of file class.ilObjFile.php.
References $version.
Referenced by ILIAS\File\Sanitation\FilePathSanitizer\__construct(), addFileVersion(), createProperties(), deleteVersions(), determineFileSize(), doUpdate(), export(), getArrayForDatabase(), getFile(), raiseUploadError(), replaceFile(), and storeUnzipedFile().
ilObjFile::getVersions | ( | $version_ids = null | ) |
Gets the file versions for this object.
array | $version_ids | The file versions to get. If not specified all versions are returned. |
Example: array ('date' => '2019-07-25 11:19:51', 'user_id' => '6', 'obj_id' => '287', 'obj_type' => 'file', 'action' => 'create', 'info_params' => 'chicken_outlined.pdf,1,1', 'user_comment' => '', 'hist_entry_id' => '3', 'title' => NULL, )
Definition at line 1329 of file class.ilObjFile.php.
References $index, PHPMailer\PHPMailer\$params, $version, ilHistory\_getEntriesForObject(), ilObject2\getId(), ilObject2\getType(), and parseInfoParams().
Referenced by deleteVersions().
ilObjFile::getXMLZip | ( | ) |
Definition at line 1182 of file class.ilObjFile.php.
References $DIC, ilUtil\escapeShellArg(), getDirectory(), and getFileName().
ilObjFile::guessFileType | ( | $a_file = "" | ) |
Guesses the file type based on the current values returned by getFileType() and getFileExtension().
If getFileType() returns 'application/octet-stream', the file extension is used to guess a more accurate file type.
Definition at line 939 of file class.ilObjFile.php.
References $filename, $path, getFileExtension(), getFileType(), and ilMimeTypeUtil\getMimeType().
Referenced by determineFileSize(), and updateWithVersion().
|
staticprotected |
Definition at line 1553 of file class.ilObjFile.php.
References getDiskUsage(), ilObject2\getId(), ilObject2\getType(), getUsages(), and ilDiskQuotaHandler\handleUpdatedSourceObject().
Referenced by raiseUploadError().
ilObjFile::hasRating | ( | ) |
Definition at line 1620 of file class.ilObjFile.php.
References $rating.
Referenced by getArrayForDatabase().
ilObjFile::initFileStorage | ( | ) |
init file storage object
public
Definition at line 1230 of file class.ilObjFile.php.
References ilObject2\getId().
Referenced by __construct(), createProperties(), doRead(), and getDirectory().
ilObjFile::initType | ( | ) |
Definition at line 113 of file class.ilObjFile.php.
ilObjFile::isHidden | ( | ) |
Returns true, if this file should be hidden in the repository view.
Definition at line 924 of file class.ilObjFile.php.
References ilObjFileAccess\_isFileHidden(), and ilObject2\getTitle().
Referenced by addNewsNotification().
ilObjFile::isInline | ( | ) |
Returns true, if this file should be displayed inline in a browser window.
This is especially useful for PDF documents, HTML pages, and for images which are directly supported by the browser.
Definition at line 913 of file class.ilObjFile.php.
References ilObjFileAccess\_isFileInline(), and ilObject2\getTitle().
Referenced by determineFileSize().
|
private |
Parses the info parameters ("info_params") of the specified history entry.
array | $entry | The history entry. |
Definition at line 1500 of file class.ilObjFile.php.
References $data, $n, and $result.
Referenced by determineFileSize(), getFile(), getSpecificVersion(), getVersions(), and raiseUploadError().
ilObjFile::raiseUploadError | ( | $a_raise = true | ) |
Definition at line 299 of file class.ilObjFile.php.
References $DIC, $metadata, $result, $version, ilHistory\_getEntriesForObject(), createPreview(), doUpdate(), getDirectory(), ilObject2\getId(), getMaxVersion(), ilObject2\getType(), getVersion(), handleQuotaUpdate(), ilUtil\makeDirParents(), ILIAS\FileUpload\DTO\ProcessingStatus\OK, ilCountPDFPagesPreProcessors\PAGE_COUNT, parseInfoParams(), setFileName(), setMaxVersion(), setPageCount(), and setVersion().
ilObjFile::replaceFile | ( | $a_upload_file, | |
$a_filename | |||
) |
$a_upload_file | |
$a_filename |
Definition at line 392 of file class.ilObjFile.php.
References $result, ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), getMaxVersion(), and getVersion().
ilObjFile::rollback | ( | $version_id | ) |
Makes the specified version the current one and returns theSummary of rollbackVersion.
int | $version_id | The id of the version to make the current one. |
Definition at line 1390 of file class.ilObjFile.php.
References $DIC, $ilDB, $ilUser, $source, ilHistory\_changeUserId(), ilHistory\_createEntry(), ilHistory\_getEntriesForObject(), addNewsNotification(), copy(), getDirectory(), ilObject2\getId(), getMaxVersion(), getSpecificVersion(), ilUtil\makeDir(), setMaxVersion(), and updateWithVersion().
ilObjFile::setAction | ( | $a_action | ) |
Definition at line 643 of file class.ilObjFile.php.
ilObjFile::setFileName | ( | $a_name | ) |
string | $a_name |
Definition at line 595 of file class.ilObjFile.php.
Referenced by doRead(), raiseUploadError(), and updateWithVersion().
ilObjFile::setFileSize | ( | $a_size | ) |
$a_size |
Definition at line 631 of file class.ilObjFile.php.
Referenced by determineFileSize(), and doRead().
ilObjFile::setFileType | ( | $a_type | ) |
string | $a_type |
Definition at line 613 of file class.ilObjFile.php.
References $a_type.
Referenced by doMDUpdateListener(), doRead(), and updateWithVersion().
ilObjFile::setMaxVersion | ( | $a_max_version | ) |
Definition at line 728 of file class.ilObjFile.php.
Referenced by doRead(), raiseUploadError(), rollback(), and updateWithVersion().
ilObjFile::setMode | ( | $a_mode | ) |
mode is object or filelist
string | $a_mode | mode |
Definition at line 745 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setNoMetaDataCreation | ( | $a_status | ) |
bool | $a_status |
Definition at line 188 of file class.ilObjFile.php.
ilObjFile::setPageCount | ( | $page_count | ) |
int | $page_count |
Definition at line 1638 of file class.ilObjFile.php.
References $page_count.
Referenced by doRead(), and raiseUploadError().
ilObjFile::setRating | ( | $a_value | ) |
bool | $a_value |
Definition at line 1611 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setRollbackUserId | ( | $a_rollback_user_id | ) |
Definition at line 667 of file class.ilObjFile.php.
ilObjFile::setRollbackVersion | ( | $a_rollback_version | ) |
Definition at line 655 of file class.ilObjFile.php.
ilObjFile::setVersion | ( | $a_version | ) |
Definition at line 716 of file class.ilObjFile.php.
Referenced by doRead(), raiseUploadError(), storeUnzipedFile(), and updateWithVersion().
ilObjFile::storeUnzipedFile | ( | $a_upload_file, | |
$a_filename | |||
) |
storeUnzipedFile
Stores Files unzipped from uploaded archive in filesystem
string | $a_upload_file | |
string | $a_filename |
Definition at line 1247 of file class.ilObjFile.php.
References createPreview(), getDirectory(), ilFileUtils\getValidFilename(), getVersion(), ilUtil\makeDir(), ilFileUtils\rename(), and setVersion().
|
protected |
Updates the file object with the specified file version.
array | $version | The version to update the file object with. |
Definition at line 1452 of file class.ilObjFile.php.
References $version, checkFileExtension(), createPreview(), determineFileSize(), ilObject2\getTitle(), guessFileType(), setFileName(), setFileType(), setMaxVersion(), ilObject2\setTitle(), setVersion(), and ilObject2\update().
Referenced by deleteVersions(), and rollback().
|
protected |
Definition at line 80 of file class.ilObjFile.php.
Referenced by getAction().
|
private |
Definition at line 64 of file class.ilObjFile.php.
|
protected |
Definition at line 40 of file class.ilObjFile.php.
|
protected |
Definition at line 32 of file class.ilObjFile.php.
Referenced by getFileName(), and guessFileType().
|
protected |
Definition at line 44 of file class.ilObjFile.php.
Referenced by getFileSize().
|
protected |
Definition at line 36 of file class.ilObjFile.php.
Referenced by getFileType().
|
protected |
Definition at line 68 of file class.ilObjFile.php.
|
protected |
Definition at line 76 of file class.ilObjFile.php.
Referenced by getMaxVersion().
ilObjFile::$mode = self::MODE_OBJECT |
Definition at line 52 of file class.ilObjFile.php.
Referenced by getMode().
|
protected |
Definition at line 28 of file class.ilObjFile.php.
|
protected |
Definition at line 56 of file class.ilObjFile.php.
Referenced by getPageCount(), and setPageCount().
ilObjFile::$raise_upload_error |
Definition at line 48 of file class.ilObjFile.php.
|
protected |
Definition at line 60 of file class.ilObjFile.php.
Referenced by hasRating().
|
protected |
Definition at line 88 of file class.ilObjFile.php.
Referenced by getRollbackUserId().
|
protected |
Definition at line 84 of file class.ilObjFile.php.
Referenced by getRollbackVersion().
|
protected |
Definition at line 72 of file class.ilObjFile.php.
Referenced by deleteVersions(), getSpecificVersion(), getVersion(), getVersions(), raiseUploadError(), and updateWithVersion().
const ilObjFile::MODE_FILELIST = "filelist" |
Definition at line 23 of file class.ilObjFile.php.
const ilObjFile::MODE_OBJECT = "object" |
Definition at line 24 of file class.ilObjFile.php.