ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilWebDAVRepositoryHelper. More...
Public Member Functions | |
__construct (ilAccessHandler $access, ilTree $tree) | |
ilWebDAVRepositoryHelper constructor. More... | |
deleteObject (int $a_ref_id) | |
I stole this method of deleting objects from ilObjectGUI->confirmedDeleteObject() More... | |
checkAccess (string $a_permission, int $a_ref_id) | |
Just a redirect to the checkAccess method of ilAccess. More... | |
checkCreateAccessForType (int $a_ref_id, string $a_type) | |
Just a redirect to the checkAccess method of ilAccess to check for creation of certain obj types. More... | |
objectWithRefIdExists (int $a_ref_id) | |
Just a redirect to the ilObject::_exists. More... | |
getObjectIdFromRefId (int $a_ref_id) | |
Just a redirect to the ilObject::_lookupObjectId function. More... | |
getObjectTitleFromObjId (int $a_obj_id, bool $escape_forbidden_fileextension=false) | |
Just a redirect to the ilObject::_lookupTitle function. More... | |
getFilenameWithSanitizedFileExtension (int $a_obj_id) | |
Wraps the static call to ilObject::_lookupTitle. More... | |
getObjectTypeFromObjId (int $a_obj_id) | |
Just a redirect to the ilObject::_lookupType function. More... | |
getObjectTitleFromRefId (int $a_ref_id, bool $escape_forbidden_fileextension=false) | |
Just a shortcut and redirect to get a title from a given ref_id. More... | |
getObjectTypeFromRefId (int $a_ref_id) | |
Just a redirect to the ilObject::_lookupType function. More... | |
getChildrenOfRefId (int $a_ref_id) | |
Just a redirect to getChildIds of ilTree. More... | |
Protected Member Functions | |
getRawObjectTitleFromObjId (int $a_obj_id) | |
Wraps the static call to ilObject::_lookupTitle. More... | |
Protected Attributes | |
$access | |
$tree | |
Class ilWebDAVRepositoryHelper.
This is a helper class and mostly also a wrapper class for repository actions. It is used by ilObj*DAV objects and makes them more unit testable. This is really helpful since static calls like ilObject::_exists() are not mockable
Definition at line 12 of file class.ilWebDAVRepositoryHelper.php.
ilWebDAVRepositoryHelper::__construct | ( | ilAccessHandler | $access, |
ilTree | $tree | ||
) |
ilWebDAVRepositoryHelper constructor.
ilAccessHandler | $access | |
ilTree | $tree |
Definition at line 26 of file class.ilWebDAVRepositoryHelper.php.
References $access, and $tree.
ilWebDAVRepositoryHelper::checkAccess | ( | string | $a_permission, |
int | $a_ref_id | ||
) |
Just a redirect to the checkAccess method of ilAccess.
$a_permission | |
$a_ref_id |
Definition at line 53 of file class.ilWebDAVRepositoryHelper.php.
ilWebDAVRepositoryHelper::checkCreateAccessForType | ( | int | $a_ref_id, |
string | $a_type | ||
) |
Just a redirect to the checkAccess method of ilAccess to check for creation of certain obj types.
int | $a_ref_id | |
string | $a_type |
Definition at line 65 of file class.ilWebDAVRepositoryHelper.php.
ilWebDAVRepositoryHelper::deleteObject | ( | int | $a_ref_id | ) |
I stole this method of deleting objects from ilObjectGUI->confirmedDeleteObject()
$a_ref_id | ref_id of object to delete |
ilRepositoryException |
Definition at line 38 of file class.ilWebDAVRepositoryHelper.php.
ilWebDAVRepositoryHelper::getChildrenOfRefId | ( | int | $a_ref_id | ) |
Just a redirect to getChildIds of ilTree.
$a_ref_id |
Definition at line 186 of file class.ilWebDAVRepositoryHelper.php.
ilWebDAVRepositoryHelper::getFilenameWithSanitizedFileExtension | ( | int | $a_obj_id | ) |
Wraps the static call to ilObject::_lookupTitle.
This is on one hand necessary to create unit tests. And on the other hand, it guarantees the return of a string, which ilObject::_lookupTitle() doesn't.
int | $a_obj_id |
ilFileUtilsException |
Definition at line 116 of file class.ilWebDAVRepositoryHelper.php.
References getRawObjectTitleFromObjId(), and ilFileUtils\getValidFilename().
Referenced by getObjectTitleFromObjId().
ilWebDAVRepositoryHelper::getObjectIdFromRefId | ( | int | $a_ref_id | ) |
Just a redirect to the ilObject::_lookupObjectId function.
$a_ref_id |
Definition at line 87 of file class.ilWebDAVRepositoryHelper.php.
References ilObject\_lookupObjectId().
Referenced by getObjectTitleFromRefId().
ilWebDAVRepositoryHelper::getObjectTitleFromObjId | ( | int | $a_obj_id, |
bool | $escape_forbidden_fileextension = false |
||
) |
Just a redirect to the ilObject::_lookupTitle function.
$a_obj_id |
Definition at line 98 of file class.ilWebDAVRepositoryHelper.php.
References $title, ilObject\_lookupType(), getFilenameWithSanitizedFileExtension(), and getRawObjectTitleFromObjId().
Referenced by getObjectTitleFromRefId().
ilWebDAVRepositoryHelper::getObjectTitleFromRefId | ( | int | $a_ref_id, |
bool | $escape_forbidden_fileextension = false |
||
) |
Just a shortcut and redirect to get a title from a given ref_id.
$a_ref_id |
Definition at line 161 of file class.ilWebDAVRepositoryHelper.php.
References getObjectIdFromRefId(), and getObjectTitleFromObjId().
ilWebDAVRepositoryHelper::getObjectTypeFromObjId | ( | int | $a_obj_id | ) |
Just a redirect to the ilObject::_lookupType function.
$a_ref_id |
Definition at line 148 of file class.ilWebDAVRepositoryHelper.php.
References $type, and ilObject\_lookupType().
ilWebDAVRepositoryHelper::getObjectTypeFromRefId | ( | int | $a_ref_id | ) |
Just a redirect to the ilObject::_lookupType function.
$a_ref_id |
Definition at line 174 of file class.ilWebDAVRepositoryHelper.php.
References $type, and ilObject\_lookupType().
|
protected |
Wraps the static call to ilObject::_lookupTitle.
This is on one hand necessary to create unit tests. And on the other hand, it guarantees the return of a string, which ilObject::_lookupTitle() doesn't.
int | $a_obj_id |
Definition at line 136 of file class.ilWebDAVRepositoryHelper.php.
References $title, and ilObject\_lookupTitle().
Referenced by getFilenameWithSanitizedFileExtension(), and getObjectTitleFromObjId().
ilWebDAVRepositoryHelper::objectWithRefIdExists | ( | int | $a_ref_id | ) |
Just a redirect to the ilObject::_exists.
$a_ref_id |
Definition at line 76 of file class.ilWebDAVRepositoryHelper.php.
References ilObject\_exists().
|
protected |
Definition at line 15 of file class.ilWebDAVRepositoryHelper.php.
Referenced by __construct().
|
protected |
Definition at line 18 of file class.ilWebDAVRepositoryHelper.php.
Referenced by __construct().