Stud.IP  jlu_4.3 Revision 64286
ResourceFolder Class Reference
Inheritance diagram for ResourceFolder:
Inheritance graph
Collaboration diagram for ResourceFolder:
Collaboration graph

Public Member Functions

 getIcon ($role=Icon::DEFAULT_ROLE)
 
 isVisible ($user_id)
 
 isReadable ($user_id)
 
 isWritable ($user_id)
 
 isEditable ($user_id)
 
 isSubfolderAllowed ($user_id)
 
 getSubfolder ()
 
 getEditTemplate ()
 
 setDataFromEditTemplate ($folderdata)
 
 createSubfolder (FolderType $foldertype)
 
 deleteSubfolder ($subfolder_id)
 
 isFileDownloadable ($file_ref_id, $user_id)
 
 isFileEditable ($file_ref_id, $user_id)
 
 isFileWritable ($file_ref_id, $user_id)
 
- Public Member Functions inherited from StandardFolder
 __construct ($folderdata=null)
 
 getIcon ($role=Icon::DEFAULT_ROLE)
 
 getId ()
 
 __get ($attribute)
 
 __set ($name, $value)
 
 isVisible ($user_id)
 
 isReadable ($user_id)
 
 isWritable ($user_id)
 
 isEditable ($user_id)
 
 isSubfolderAllowed ($user_id)
 
 getDescriptionTemplate ()
 
 getEditTemplate ()
 
 setDataFromEditTemplate ($request)
 
 store ()
 
 validateUpload ($uploadedfile, $user_id)
 
 getSubfolders ()
 
 getFiles ()
 
 getParent ()
 
 createFile ($file)
 
 deleteFile ($file_ref_id)
 
 createSubfolder (FolderType $foldertype)
 
 deleteSubfolder ($subfolder_id)
 
 delete ()
 
 isFileDownloadable ($fileref_or_id, $user_id)
 
 isFileEditable ($fileref_or_id, $user_id)
 
 isFileWritable ($fileref_or_id, $user_id)
 
 getRangeObject ()
 
 getIcon ($role)
 
 getId ()
 
 isVisible ($user_id)
 
 isReadable ($user_id)
 
 isWritable ($user_id)
 
 isEditable ($user_id)
 
 isSubfolderAllowed ($user_id)
 
 getDescriptionTemplate ()
 
 getSubfolders ()
 
 getFiles ()
 
 getParent ()
 
 getEditTemplate ()
 
 setDataFromEditTemplate ($folderdata)
 
 validateUpload ($file, $user_id)
 
 createFile ($file)
 
 deleteFile ($file_ref_id)
 
 createSubfolder (FolderType $foldertype)
 
 deleteSubfolder ($subfolder_id)
 
 delete ()
 
 store ()
 
 isFileDownloadable ($file_ref_id, $user_id)
 
 isFileEditable ($file_ref_id, $user_id)
 
 isFileWritable ($file_ref_id, $user_id)
 

Static Public Member Functions

static getTypeName ()
 
static availableInRange ($range_id_or_object, $user_id)
 
static getTypeName ()
 
static availableInRange ($range_id_or_object, $user_id)
 
static getTypeName ()
 
static availableInRange ($range_id_or_object, $user_id)
 

Additional Inherited Members

- Static Public Attributes inherited from StandardFolder
static $sorter = 0
 
- Protected Attributes inherited from StandardFolder
 $folderdata
 

Detailed Description

This is a folder type for files associated with Resource objects. Its purpose is to allow users to link or add relevant files to a Resource. An an example, one could attach a fire escape plan to a Building resource.

Member Function Documentation

◆ availableInRange()

static availableInRange (   $range_id_or_object,
  $user_id 
)
static

This method tells if the FolderType implementation can be created in a specific range type.

Some FolderType implementations aren't useful in conjunction with a specific range type. An FolderType implementation therefore must provide this method so that other parts of the file area system can easily check if folders of the FolderType implementation can be placed inside standard folders.

Parameters
string | Object$range_id_or_objectid or object of type "course", "user", "institute", "message" or "resource"
string$user_id
Returns
boolean True, if creatable, false otherwise.

Reimplemented from StandardFolder.

Here is the call graph for this function:

◆ createSubfolder()

createSubfolder ( FolderType  $foldertype)
Parameters
FolderType$foldertype
Returns
FolderType|null

Reimplemented from StandardFolder.

◆ deleteSubfolder()

deleteSubfolder (   $subfolder_id)
Parameters
string$subfolder_id
Returns
bool

Reimplemented from StandardFolder.

◆ getEditTemplate()

getEditTemplate ( )
Returns
string|Flexi_Template

Reimplemented from StandardFolder.

◆ getIcon()

getIcon (   $role = Icon::DEFAULT_ROLE)
Parameters
string$role
Returns
Icon

Reimplemented from StandardFolder.

Here is the call graph for this function:

◆ getSubfolder()

getSubfolder ( )

◆ getTypeName()

static getTypeName ( )
static
Returns
string

Reimplemented from StandardFolder.

◆ isEditable()

isEditable (   $user_id)
Parameters
string$user_id
Returns
bool

Reimplemented from StandardFolder.

◆ isFileDownloadable()

isFileDownloadable (   $fileref_or_id,
  $user_id 
)
Parameters
FileRef | string$fileref_or_id
string$user_id
Returns
bool

Reimplemented from StandardFolder.

Here is the call graph for this function:

◆ isFileEditable()

isFileEditable (   $fileref_or_id,
  $user_id 
)
Parameters
FileRef | string$fileref_or_id
string$user_id
Returns
bool

Reimplemented from StandardFolder.

Here is the call graph for this function:

◆ isFileWritable()

isFileWritable (   $fileref_or_id,
  $user_id 
)

Checks if a user has write permissions to a file.

For standard folders write permissions are granted if the user is the owner of the file or if the user has at least tutor permissions on the Stud.IP object specified by range_id (such objects may be courses or institutes for example).

Parameters
FileRef | string$fileref_or_id
string$user_id
Returns
bool

Reimplemented from StandardFolder.

Here is the call graph for this function:

◆ isReadable()

isReadable (   $user_id)
Parameters
string$user_id
Returns
bool

Reimplemented from StandardFolder.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSubfolderAllowed()

isSubfolderAllowed (   $user_id)
Parameters
string$user_id
Returns
bool

Reimplemented from StandardFolder.

◆ isVisible()

isVisible (   $user_id)
Parameters
string$user_id
Returns
bool

Reimplemented from StandardFolder.

Here is the call graph for this function:

◆ isWritable()

isWritable (   $user_id)
Parameters
string$user_id
Returns
bool

Reimplemented from StandardFolder.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDataFromEditTemplate()

setDataFromEditTemplate (   $request)
Parameters
Request$request
Returns
FolderType|MessageBox

Reimplemented from StandardFolder.

Here is the call graph for this function:

The documentation for this class was generated from the following file: