ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Public Member Functions | |
__construct ($a_id=0, $a_call_by_reference=true) | |
ilObjFile constructor. More... | |
initType () | |
Init type. More... | |
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) | |
getUploadFile ($a_upload_file, $a_filename, $a_prevent_preview=false, $handle_secure_name=true) | |
replaceFile ($a_upload_file, $a_filename) | |
replace file with new file More... | |
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) | |
set filename More... | |
getFileName () | |
setFileType ($a_type) | |
getFileType () | |
setFileSize ($a_size) | |
getFileSize () | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. More... | |
getFile ($a_hist_entry_id=null) | |
setVersion ($a_version) | |
getVersion () | |
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... | |
parseInfoParams ($entry) | |
Parses the info parameters ("info_params") of the specified history entry. More... | |
setRating ($a_value) | |
hasRating () | |
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... | |
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... | |
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 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 () | |
cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false) | |
Clone object permissions, put in tree ... More... | |
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) |
return absolute path for version More... | |
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 | _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 type $ilDB. 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 | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Get icon for repository item. 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 | |
$filename | |
$filetype | |
$filemaxsize = "20000000" | |
$raise_upload_error | |
$mode = "object" | |
Data Fields inherited from ilObject | |
const | TITLE_LENGTH = 255 |
max length of object title More... | |
const | DESC_LENGTH = 128 |
$ilias | |
$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 () | |
read file properties More... | |
beforeUpdate () | |
doUpdate () | |
update file More... | |
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 | |
$rating = false | |
$log = null | |
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 35 of file class.ilObjFile.php.
References ilObject2\getId(), ilLoggerFactory\getLogger(), and initFileStorage().
|
static |
static delete all usages of
Definition at line 924 of file class.ilObjFile.php.
References $a_type, $ilDB, $row, and array.
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 1012 of file class.ilObjFile.php.
References $a_type, $ilDB, $ret, and array.
Referenced by ilPCFileList\afterPageUpdate(), ilCOPageHTMLExport\collectPageElements(), ilObjGlossary\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLPages(), ilPageObject\getLastUpdateOfIncludedElements(), and ilCOPageExporter\getXmlExportHeadDependencies().
|
static |
return absolute path for version
Definition at line 1123 of file class.ilObjFile.php.
References $file_storage, _lookupFileName(), and _lookupVersion().
Referenced by ilFolderDownloadBackgroundTaskHandler\copyFile(), ilContainerGUI\copyFile(), ilObjWorkspaceFolder\recurseFolder(), and ilObjFolder\recurseFolder().
|
static |
Definition at line 595 of file class.ilObjFile.php.
References $ilDB, $r, $row, ilDBConstants\FETCHMODE_OBJECT, and ilUtil\stripSlashes().
Referenced by _lookupAbsolutePath(), ilSCORM2004PageGUI\setDefaultLinkXml(), and ilFilePreviewRenderer\supports().
|
static |
Lookups the file size of the file in bytes.
Definition at line 608 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupFileSize().
Referenced by ilPageObject\addFileSizes(), ilObjFileDAV\getContentLength(), and ilObjFileGUI\infoScreenForward().
|
static |
lookup version
Definition at line 617 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupVersion().
Referenced by _lookupAbsolutePath().
|
static |
save usage
Definition at line 958 of file class.ilObjFile.php.
References $a_type, $ilDB, ilObject\_lookupType(), and array.
Referenced by ilPCFileList\saveFileUsage().
|
static |
Definition at line 584 of file class.ilObjFile.php.
Referenced by doMDUpdateListener().
ilObjFile::addFileVersion | ( | $a_upload_file, | |
$a_filename | |||
) |
Definition at line 291 of file class.ilObjFile.php.
References ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), getUploadFile(), and getVersion().
ilObjFile::addNewsNotification | ( | $a_lang_var | ) |
Definition at line 1051 of file class.ilObjFile.php.
References $ilUser, ilObject2\getDescription(), ilObject2\getId(), ilObject2\getType(), isHidden(), NEWS_NOTICE, and NEWS_USERS.
Referenced by addFileVersion(), createProperties(), replaceFile(), and rollback().
|
protected |
Definition at line 136 of file class.ilObjFile.php.
|
protected |
Definition at line 856 of file class.ilObjFile.php.
References $ilDB, and getUsages().
|
protected |
Definition at line 162 of file class.ilObjFile.php.
References ilObject\$title, checkFileExtension(), getFileName(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Definition at line 418 of file class.ilObjFile.php.
References getMode(), and ilObject2\updateMetaData().
|
protected |
Definition at line 141 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 1141 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and getFileName().
Referenced by beforeMDUpdateListener(), and updateWithVersion().
ilObjFile::clearDataDirectory | ( | ) |
clear data directory
Definition at line 320 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 1306 of file class.ilObjFile.php.
ilObjFile::copy | ( | $a_source, | |
$a_destination | |||
) |
copy file
Definition at line 312 of file class.ilObjFile.php.
References getDirectory().
Referenced by rollback().
ilObjFile::createDirectory | ( | ) |
Definition at line 227 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 1376 of file class.ilObjFile.php.
References ilPreview\createPreview(), and getMode().
Referenced by addFileVersion(), getUploadFile(), 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 77 of file class.ilObjFile.php.
References $_GET, $ilDB, $res, ilHistory\_createEntry(), ilNewsItem\_getDefaultVisibilityForRefId(), ilBlockSetting\_write(), addNewsNotification(), ilObject2\createMetaData(), ilLogLevel\DEBUG, ilStr\getBytesForString(), getFileName(), getFileSize(), getFileType(), ilObject2\getId(), getMode(), and initFileStorage().
Referenced by doCreate().
|
protected |
Deletes the preview of the file object.
Definition at line 1389 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 331 of file class.ilObjFile.php.
References $ilDB, $version, ilHistory\_removeEntriesForObject(), ilHistory\_removeEntryByHistoryID(), clearDataDirectory(), ilUtil\delDir(), getDirectory(), ilObject2\getId(), getVersion(), getVersions(), setVersion(), and updateWithVersion().
ilObjFile::determineFileSize | ( | $a_hist_entry_id = null | ) |
Determine File Size.
Definition at line 626 of file class.ilObjFile.php.
References $data, $file, ilHistory\_getEntryByHistoryID(), ilFileDelivery\DISP_ATTACHMENT, ilFileDelivery\DISP_INLINE, getDirectory(), getFileName(), ilObject2\getTitle(), getVersion(), guessFileType(), isInline(), parseInfoParams(), and setFileSize().
Referenced by updateWithVersion().
|
protected |
Clone.
public
object | clone |
int | target id |
int | copy id |
Definition at line 815 of file class.ilObjFile.php.
References $ilDB, $query, $res, ilHistory\_copyEntriesForObject(), ilObject2\cloneMetaData(), ilPreview\copyPreviews(), 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 62 of file class.ilObjFile.php.
References createProperties().
|
protected |
create file object meta data
Definition at line 149 of file class.ilObjFile.php.
References getFileSize(), getFileType(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Definition at line 869 of file class.ilObjFile.php.
References $ilDB, ilHistory\_removeEntriesForObject(), ilUtil\delDir(), ilObject2\deleteMetaData(), deletePreview(), getDirectory(), ilObject2\getId(), and getMode().
|
protected |
Definition at line 178 of file class.ilObjFile.php.
References ilObject\$id, _writeFileType(), ilObject2\getId(), ilObject2\getType(), and setFileType().
|
protected |
read file properties
Definition at line 400 of file class.ilObjFile.php.
References $ilDB, $r, $row, ilDBConstants\FETCHMODE_OBJECT, ilObject2\getId(), initFileStorage(), setFileName(), setFileSize(), setFileType(), setMode(), setRating(), and setVersion().
|
protected |
update file
Definition at line 432 of file class.ilObjFile.php.
References $ilDB, $ilLog, $res, getFileName(), getFileSize(), ilObject2\getId(), getMode(), getVersion(), and hasRating().
|
protected |
update meta data
Definition at line 455 of file class.ilObjFile.php.
References 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 906 of file class.ilObjFile.php.
References getDirectory(), ilObject2\getId(), getVersion(), ilUtil\makeDir(), and ilUtil\rCopy().
ilObjFile::getDirectory | ( | $a_version = 0 | ) |
Definition at line 208 of file class.ilObjFile.php.
References initFileStorage().
Referenced by clearDataDirectory(), copy(), createDirectory(), deleteVersions(), determineFileSize(), doCloneObject(), doDelete(), export(), getFile(), getUploadFile(), getXMLZip(), rollback(), and storeUnzipedFile().
ilObjFile::getDiskUsage | ( | ) |
Gets the disk usage of the object in bytes.
public
Definition at line 523 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupDiskUsage().
Referenced by handleQuotaUpdate().
ilObjFile::getFile | ( | $a_hist_entry_id = null | ) |
Definition at line 531 of file class.ilObjFile.php.
References $data, $file, ilHistory\_getEntryByHistoryID(), getDirectory(), getFileName(), getVersion(), and parseInfoParams().
Referenced by ilDclRecordListGUI\sendFile().
ilObjFile::getFileExtension | ( | ) |
Returns the extension of the file name converted to lower-case.
e.g. returns 'pdf' for 'document.pdf'.
Definition at line 725 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and ilObject2\getTitle().
ilObjFile::getFileName | ( | ) |
Definition at line 490 of file class.ilObjFile.php.
References $filename.
Referenced by beforeMDUpdateListener(), checkFileExtension(), createProperties(), determineFileSize(), doUpdate(), getFile(), and getXMLZip().
ilObjFile::getFileSize | ( | ) |
Definition at line 513 of file class.ilObjFile.php.
Referenced by createProperties(), doCreateMetaData(), doUpdate(), and doUpdateMetaData().
ilObjFile::getFileType | ( | ) |
Definition at line 503 of file class.ilObjFile.php.
References $filetype.
Referenced by createProperties(), doCreateMetaData(), doUpdateMetaData(), and guessFileType().
ilObjFile::getMode | ( | ) |
mode is object or filelist
Definition at line 579 of file class.ilObjFile.php.
References $mode.
Referenced by beforeUpdate(), createPreview(), createProperties(), deletePreview(), doDelete(), and doUpdate().
ilObjFile::getSpecificVersion | ( | $version_id | ) |
Gets a specific file version.
int | $version_id | The version id to get. |
Definition at line 1206 of file class.ilObjFile.php.
References $params, $version, ilHistory\_getEntryByHistoryID(), and parseInfoParams().
Referenced by rollback().
ilObjFile::getUploadFile | ( | $a_upload_file, | |
$a_filename, | |||
$a_prevent_preview = false , |
|||
$handle_secure_name = true |
|||
) |
Definition at line 237 of file class.ilObjFile.php.
References $file, createPreview(), getDirectory(), ilObject2\getTitle(), ilFileUtils\getValidFilename(), getVersion(), handleQuotaUpdate(), ilUtil\makeDirParents(), ilUtil\moveUploadedFile(), setFileName(), ilObject2\setTitle(), setVersion(), and ilObject2\update().
Referenced by addFileVersion(), and replaceFile().
ilObjFile::getUsages | ( | ) |
get all usages of file object
Definition at line 985 of file class.ilObjFile.php.
References $ilDB, $ret, array, and ilObject2\getId().
Referenced by beforeDelete(), and handleQuotaUpdate().
ilObjFile::getVersion | ( | ) |
Definition at line 559 of file class.ilObjFile.php.
Referenced by addFileVersion(), deleteVersions(), determineFileSize(), doUpdate(), export(), getFile(), getUploadFile(), rollback(), 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. |
Definition at line 1171 of file class.ilObjFile.php.
References $params, $version, ilHistory\_getEntriesForObject(), array, ilObject2\getId(), ilObject2\getType(), and parseInfoParams().
Referenced by deleteVersions().
ilObjFile::getXMLZip | ( | ) |
Definition at line 1039 of file class.ilObjFile.php.
References ilObject\$ilias, 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 753 of file class.ilObjFile.php.
References $path, getFileType(), and ilMimeTypeUtil\getMimeType().
Referenced by determineFileSize(), and updateWithVersion().
|
staticprotected |
Definition at line 1346 of file class.ilObjFile.php.
References array, getDiskUsage(), ilObject2\getId(), ilObject2\getType(), getUsages(), and ilDiskQuotaHandler\handleUpdatedSourceObject().
Referenced by getUploadFile().
ilObjFile::hasRating | ( | ) |
Definition at line 1404 of file class.ilObjFile.php.
References $rating.
Referenced by doUpdate().
ilObjFile::initFileStorage | ( | ) |
init file storage object
public
Definition at line 1086 of file class.ilObjFile.php.
References ilObject2\getId().
Referenced by __construct(), createProperties(), doRead(), and getDirectory().
ilObjFile::initType | ( | ) |
ilObjFile::isHidden | ( | ) |
Returns true, if this file should be hidden in the repository view.
Definition at line 741 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 734 of file class.ilObjFile.php.
References ilObjFileAccess\_isFileInline(), and ilObject2\getTitle().
Referenced by determineFileSize().
ilObjFile::parseInfoParams | ( | $entry | ) |
Parses the info parameters ("info_params") of the specified history entry.
array | $entry | The history entry. |
Definition at line 1318 of file class.ilObjFile.php.
References $data, $result, and array.
Referenced by determineFileSize(), getFile(), getSpecificVersion(), and getVersions().
ilObjFile::raiseUploadError | ( | $a_raise = true | ) |
Definition at line 232 of file class.ilObjFile.php.
ilObjFile::replaceFile | ( | $a_upload_file, | |
$a_filename | |||
) |
replace file with new file
Definition at line 273 of file class.ilObjFile.php.
References ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), and getUploadFile().
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 1231 of file class.ilObjFile.php.
References $ilDB, $ilUser, ilHistory\_changeUserId(), ilHistory\_createEntry(), addNewsNotification(), copy(), getDirectory(), ilObject2\getId(), getSpecificVersion(), getVersion(), ilUtil\makeDir(), and updateWithVersion().
ilObjFile::setFileName | ( | $a_name | ) |
set filename
Definition at line 485 of file class.ilObjFile.php.
Referenced by doRead(), getUploadFile(), and updateWithVersion().
ilObjFile::setFileSize | ( | $a_size | ) |
Definition at line 508 of file class.ilObjFile.php.
Referenced by determineFileSize(), and doRead().
ilObjFile::setFileType | ( | $a_type | ) |
Definition at line 495 of file class.ilObjFile.php.
References $a_type, and $ilLog.
Referenced by doMDUpdateListener(), doRead(), and updateWithVersion().
ilObjFile::setMode | ( | $a_mode | ) |
mode is object or filelist
string | $a_mode | mode |
Definition at line 569 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setNoMetaDataCreation | ( | $a_status | ) |
Definition at line 131 of file class.ilObjFile.php.
ilObjFile::setRating | ( | $a_value | ) |
Definition at line 1399 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setVersion | ( | $a_version | ) |
Definition at line 554 of file class.ilObjFile.php.
Referenced by deleteVersions(), doRead(), getUploadFile(), 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 1100 of file class.ilObjFile.php.
References $file, createPreview(), getDirectory(), 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 1278 of file class.ilObjFile.php.
References $version, checkFileExtension(), createPreview(), determineFileSize(), ilObject2\getTitle(), guessFileType(), setFileName(), setFileType(), ilObject2\setTitle(), setVersion(), and ilObject2\update().
Referenced by deleteVersions(), and rollback().
|
private |
Definition at line 25 of file class.ilObjFile.php.
Referenced by _lookupAbsolutePath().
ilObjFile::$filemaxsize = "20000000" |
Definition at line 20 of file class.ilObjFile.php.
ilObjFile::$filename |
Definition at line 18 of file class.ilObjFile.php.
Referenced by getFileName().
ilObjFile::$filetype |
Definition at line 19 of file class.ilObjFile.php.
Referenced by getFileType().
|
protected |
Definition at line 26 of file class.ilObjFile.php.
ilObjFile::$mode = "object" |
Definition at line 22 of file class.ilObjFile.php.
Referenced by getMode().
ilObjFile::$raise_upload_error |
Definition at line 21 of file class.ilObjFile.php.
|
protected |
Definition at line 23 of file class.ilObjFile.php.
Referenced by hasRating().