ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
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 () | |
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 () | |
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... | |
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 | _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 | |
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 | |
Protected Attributes inherited from ilObject | |
$objDefinition | |
$db | |
$log | |
$error | |
$tree | |
$app_event_handler | |
$rbacadmin | |
$rbacreview | |
Private Member Functions | |
getArrayForDatabase () | |
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 80 of file class.ilObjFile.php.
References ilObject2\getId(), ilLoggerFactory\getLogger(), and initFileStorage().
|
static |
static delete all usages of
Definition at line 970 of file class.ilObjFile.php.
References $a_type, $DIC, $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 1057 of file class.ilObjFile.php.
References $a_type, $DIC, $ilDB, $ret, and array.
Referenced by ilPCFileList\afterPageUpdate(), ilCOPageHTMLExport\collectPageElements(), ilPageObjectGUI\downloadFile(), ilObjGlossary\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLPages(), ilPageObject\getLastUpdateOfIncludedElements(), and ilCOPageExporter\getXmlExportHeadDependencies().
|
static |
int | $obj_id | |
int | $a_version |
Definition at line 1171 of file class.ilObjFile.php.
References $s.
Referenced by ilFolderDownloadBackgroundTaskHandler\copyFile(), ilContainerGUI\copyFile(), and ilObjFolder\recurseFolder().
|
static |
$a_id |
Definition at line 672 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 688 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupFileSize().
Referenced by ilPageObject\addFileSizes(), ilObjFileDAV\getContentLength(), and ilObjFileGUI\infoScreenForward().
|
static |
lookup version
Definition at line 699 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupVersion().
|
static |
save usage
Definition at line 1002 of file class.ilObjFile.php.
References $a_type, $DIC, $ilDB, ilObject\_lookupType(), and array.
Referenced by ilPCFileList\saveFileUsage().
|
static |
Definition at line 655 of file class.ilObjFile.php.
References $DIC, $ilDB, and $res.
Referenced by doMDUpdateListener().
ilObjFile::addFileVersion | ( | $a_upload_file, | |
$a_filename | |||
) |
Definition at line 360 of file class.ilObjFile.php.
References $result, ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), and getVersion().
ilObjFile::addNewsNotification | ( | $a_lang_var | ) |
Definition at line 1096 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 166 of file class.ilObjFile.php.
|
protected |
Definition at line 900 of file class.ilObjFile.php.
References $DIC, $ilDB, and getUsages().
|
protected |
Definition at line 195 of file class.ilObjFile.php.
References ilObject\$title, checkFileExtension(), getFileName(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Definition at line 477 of file class.ilObjFile.php.
References getMode(), and ilObject2\updateMetaData().
|
protected |
Definition at line 172 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 1186 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and getFileName().
Referenced by beforeMDUpdateListener(), and updateWithVersion().
ilObjFile::clearDataDirectory | ( | ) |
clear data directory
Definition at line 386 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 1367 of file class.ilObjFile.php.
ilObjFile::copy | ( | $a_source, | |
$a_destination | |||
) |
copy file
Definition at line 377 of file class.ilObjFile.php.
References getDirectory().
Referenced by rollback().
ilObjFile::createDirectory | ( | ) |
Definition at line 265 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 1445 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 119 of file class.ilObjFile.php.
References $_GET, $DIC, ilHistory\_createEntry(), ilNewsItem\_getDefaultVisibilityForRefId(), ilBlockSetting\_write(), addNewsNotification(), ilObject2\createMetaData(), ilLogLevel\DEBUG, getArrayForDatabase(), ilStr\getBytesForString(), getFileName(), getFileSize(), getFileType(), ilObject2\getId(), getMode(), and initFileStorage().
Referenced by doCreate().
|
protected |
Deletes the preview of the file object.
Definition at line 1460 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 398 of file class.ilObjFile.php.
References $DIC, $ilDB, $index, $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 710 of file class.ilObjFile.php.
References $data, $DIC, $file, $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 857 of file class.ilObjFile.php.
References $DIC, $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 106 of file class.ilObjFile.php.
References createProperties().
|
protected |
create file object meta data
Definition at line 181 of file class.ilObjFile.php.
References $format, getFileSize(), getFileType(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Definition at line 915 of file class.ilObjFile.php.
References $DIC, $ilDB, ilHistory\_removeEntriesForObject(), ilUtil\delDir(), ilObject2\deleteMetaData(), deletePreview(), getDirectory(), ilObject2\getId(), and getMode().
|
protected |
Definition at line 212 of file class.ilObjFile.php.
References ilObject\$id, _writeFileType(), ilObject2\getId(), ilObject2\getType(), and setFileType().
|
protected |
Definition at line 457 of file class.ilObjFile.php.
References $DIC, $r, $row, ilObject2\getId(), initFileStorage(), setFileName(), setFileSize(), setFileType(), setMode(), setPageCount(), setRating(), and setVersion().
|
protected |
Definition at line 488 of file class.ilObjFile.php.
References $DIC, getArrayForDatabase(), and ilObject2\getId().
Referenced by raiseUploadError().
|
protected |
update meta data
Definition at line 509 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 952 of file class.ilObjFile.php.
References getDirectory(), ilObject2\getId(), getVersion(), ilUtil\makeDir(), and ilUtil\rCopy().
|
private |
Definition at line 1511 of file class.ilObjFile.php.
References getFileName(), getFileSize(), getFileType(), ilObject2\getId(), getMode(), getPageCount(), getVersion(), and hasRating().
Referenced by createProperties(), and doUpdate().
ilObjFile::getDirectory | ( | $a_version = 0 | ) |
int | $a_version |
Definition at line 245 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 590 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupDiskUsage().
Referenced by handleQuotaUpdate().
ilObjFile::getFile | ( | $a_hist_entry_id = null | ) |
Definition at line 599 of file class.ilObjFile.php.
References $data, $file, 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 793 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and ilObject2\getTitle().
Referenced by guessFileType().
ilObjFile::getFileName | ( | ) |
Definition at line 545 of file class.ilObjFile.php.
References $filename.
Referenced by beforeMDUpdateListener(), checkFileExtension(), createProperties(), determineFileSize(), getArrayForDatabase(), getFile(), and getXMLZip().
ilObjFile::getFileSize | ( | ) |
Definition at line 578 of file class.ilObjFile.php.
References $filesize.
Referenced by createProperties(), doCreateMetaData(), doUpdateMetaData(), and getArrayForDatabase().
ilObjFile::getFileType | ( | ) |
Definition at line 563 of file class.ilObjFile.php.
References $filetype.
Referenced by createProperties(), doCreateMetaData(), doUpdateMetaData(), getArrayForDatabase(), and guessFileType().
ilObjFile::getMode | ( | ) |
mode is object or filelist
Definition at line 649 of file class.ilObjFile.php.
References $mode.
Referenced by beforeUpdate(), createPreview(), createProperties(), deletePreview(), doDelete(), and getArrayForDatabase().
ilObjFile::getPageCount | ( | ) |
Definition at line 1493 of file class.ilObjFile.php.
References $page_count.
Referenced by getArrayForDatabase().
ilObjFile::getSpecificVersion | ( | $version_id | ) |
Gets a specific file version.
int | $version_id | The version id to get. |
Definition at line 1248 of file class.ilObjFile.php.
References $params, $version, ilHistory\_getEntryByHistoryID(), and parseInfoParams().
Referenced by rollback().
ilObjFile::getUsages | ( | ) |
get all usages of file object
Definition at line 1027 of file class.ilObjFile.php.
References $DIC, $ilDB, $ret, array, and ilObject2\getId().
Referenced by beforeDelete(), and handleQuotaUpdate().
ilObjFile::getVersion | ( | ) |
Definition at line 627 of file class.ilObjFile.php.
References $version.
Referenced by addFileVersion(), deleteVersions(), determineFileSize(), export(), getArrayForDatabase(), getFile(), raiseUploadError(), replaceFile(), 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 1215 of file class.ilObjFile.php.
References $index, $params, $version, ilHistory\_getEntriesForObject(), array, ilObject2\getId(), ilObject2\getType(), and parseInfoParams().
Referenced by deleteVersions().
ilObjFile::getXMLZip | ( | ) |
Definition at line 1082 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 832 of file class.ilObjFile.php.
References $filename, $path, getFileExtension(), getFileType(), and ilMimeTypeUtil\getMimeType().
Referenced by determineFileSize(), and updateWithVersion().
|
staticprotected |
Definition at line 1417 of file class.ilObjFile.php.
References array, getDiskUsage(), ilObject2\getId(), ilObject2\getType(), getUsages(), and ilDiskQuotaHandler\handleUpdatedSourceObject().
Referenced by raiseUploadError().
ilObjFile::hasRating | ( | ) |
Definition at line 1484 of file class.ilObjFile.php.
References $rating.
Referenced by getArrayForDatabase().
ilObjFile::initFileStorage | ( | ) |
init file storage object
public
Definition at line 1130 of file class.ilObjFile.php.
References ilObject2\getId().
Referenced by __construct(), createProperties(), doRead(), and getDirectory().
ilObjFile::initType | ( | ) |
Definition at line 95 of file class.ilObjFile.php.
ilObjFile::isHidden | ( | ) |
Returns true, if this file should be hidden in the repository view.
Definition at line 817 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 806 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 1382 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 271 of file class.ilObjFile.php.
References $DIC, $metadata, $result, createPreview(), doUpdate(), getDirectory(), getVersion(), handleQuotaUpdate(), ilUtil\makeDirParents(), ILIAS\FileUpload\DTO\ProcessingStatus\OK, ilCountPDFPagesPreProcessors\PAGE_COUNT, setFileName(), setPageCount(), and setVersion().
ilObjFile::replaceFile | ( | $a_upload_file, | |
$a_filename | |||
) |
$a_upload_file | |
$a_filename |
Definition at line 346 of file class.ilObjFile.php.
References $result, ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), 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 1277 of file class.ilObjFile.php.
References $DIC, $ilDB, $ilUser, $source, ilHistory\_changeUserId(), ilHistory\_createEntry(), ilHistory\_getEntriesForObject(), addNewsNotification(), copy(), getDirectory(), ilObject2\getId(), getSpecificVersion(), getVersion(), ilUtil\makeDir(), and updateWithVersion().
ilObjFile::setFileName | ( | $a_name | ) |
string | $a_name |
Definition at line 536 of file class.ilObjFile.php.
Referenced by doRead(), raiseUploadError(), and updateWithVersion().
ilObjFile::setFileSize | ( | $a_size | ) |
$a_size |
Definition at line 572 of file class.ilObjFile.php.
Referenced by determineFileSize(), and doRead().
ilObjFile::setFileType | ( | $a_type | ) |
string | $a_type |
Definition at line 554 of file class.ilObjFile.php.
References $a_type.
Referenced by doMDUpdateListener(), doRead(), and updateWithVersion().
ilObjFile::setMode | ( | $a_mode | ) |
mode is object or filelist
string | $a_mode | mode |
Definition at line 638 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setNoMetaDataCreation | ( | $a_status | ) |
bool | $a_status |
Definition at line 160 of file class.ilObjFile.php.
ilObjFile::setPageCount | ( | $page_count | ) |
int | $page_count |
Definition at line 1502 of file class.ilObjFile.php.
References $page_count.
Referenced by doRead(), and raiseUploadError().
ilObjFile::setRating | ( | $a_value | ) |
bool | $a_value |
Definition at line 1475 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setVersion | ( | $a_version | ) |
Definition at line 621 of file class.ilObjFile.php.
Referenced by deleteVersions(), 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 1147 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 1335 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 63 of file class.ilObjFile.php.
|
protected |
Definition at line 39 of file class.ilObjFile.php.
|
protected |
Definition at line 31 of file class.ilObjFile.php.
Referenced by getFileName(), and guessFileType().
|
protected |
Definition at line 43 of file class.ilObjFile.php.
Referenced by getFileSize().
|
protected |
Definition at line 35 of file class.ilObjFile.php.
Referenced by getFileType().
|
protected |
Definition at line 67 of file class.ilObjFile.php.
ilObjFile::$mode = self::MODE_OBJECT |
Definition at line 51 of file class.ilObjFile.php.
Referenced by getMode().
|
protected |
Definition at line 27 of file class.ilObjFile.php.
|
protected |
Definition at line 55 of file class.ilObjFile.php.
Referenced by getPageCount(), and setPageCount().
ilObjFile::$raise_upload_error |
Definition at line 47 of file class.ilObjFile.php.
|
protected |
Definition at line 59 of file class.ilObjFile.php.
Referenced by hasRating().
|
protected |
Definition at line 71 of file class.ilObjFile.php.
Referenced by deleteVersions(), getSpecificVersion(), getVersion(), getVersions(), and updateWithVersion().
const ilObjFile::MODE_FILELIST = "filelist" |
Definition at line 22 of file class.ilObjFile.php.
const ilObjFile::MODE_OBJECT = "object" |
Definition at line 23 of file class.ilObjFile.php.