Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
FolderType Interface Reference
Inheritance diagram for FolderType:
CourseDateFolder CourseTopicFolder InboxOutboxFolder MessageFolder StandardFolder UnknownFolderType VirtualFolderType InboxFolder OutboxFolder CourseGroupFolder CoursePublicFolder PublicFolder MessageFolder MVVFolder PermissionEnabledFolder PublicFolder ResourceFolder RootFolder

Public Member Functions

 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 (FileType $file, $user_id)
 
 addFile (FileType $file, $user_id=null)
 
 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)
 
 getAdditionalColumns ()
 
 getContentForAdditionalColumn ($column_index)
 
 getAdditionalColumnOrderWeigh ($column_index)
 
 getAdditionalActionButtons ()
 
 copySettings ()
 

Static Public Member Functions

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

Member Function Documentation

addFile ( FileType  $file,
  $user_id = null 
)

Adds FileType object to this folder and returns the new FileType object.

Parameters
FileType$file
$user_id: id of the given user
Returns
FileType

Implemented in StandardFolder, VirtualFolderType, InboxOutboxFolder, and UnknownFolderType.

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"
string$user_id
Returns
boolean True, if creatable, false otherwise.

Implemented in MessageFolder, InboxOutboxFolder, PublicFolder, VirtualFolderType, StandardFolder, UnknownFolderType, InstitutePublicFolder, TimedFolder, CourseGroupFolder, CourseDateFolder, CoursePublicFolder, PublicFolder, HomeworkFolder, CourseTopicFolder, RootFolder, HiddenFolder, PermissionEnabledFolder, MaterialFolder, MVVFolder, and ResourceFolder.

copySettings ( )

Returns (perhaps only a subset of) description and data_content of the folder for copying

Returns
array

Implemented in StandardFolder, MessageFolder, VirtualFolderType, InboxOutboxFolder, UnknownFolderType, CourseDateFolder, CourseTopicFolder, and PermissionEnabledFolder.

createSubfolder ( FolderType  $foldertype)
Parameters
$foldertypeFolderType
Returns
FolderType|null A FolderType instance representing the created subfolder or null on failure.

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, PublicFolder, and ResourceFolder.

delete ( )

Deletes this folder.

Returns
bool True on success, False on failure.

Implemented in StandardFolder, MessageFolder, VirtualFolderType, InboxOutboxFolder, UnknownFolderType, and PublicFolder.

deleteFile (   $file_ref_id)

Deletes a file in this folder.

Parameters
string$file_ref_idThe ID of the FileRef object of the file that shall be deleted.
Returns
bool True on success, False on failure.

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, and PublicFolder.

deleteSubfolder (   $subfolder_id)

Deletes a subfolder in this folder.

Parameters
string$subfolder_idThe ID of the subfolder that shall be deleted.
Returns
bool True on success, False on failure.

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, PublicFolder, and ResourceFolder.

getAdditionalActionButtons ( )

Returns an array of Studip or Studip objects that get displayed underneath the files-table.

Returns
array of Studip or Studip

Implemented in StandardFolder, VirtualFolderType, InboxOutboxFolder, and UnknownFolderType.

getAdditionalColumnOrderWeigh (   $column_index)

Returns an integer that marks the value the content of the given column should be ordered by.

Parameters
string$column_index
Returns
integer : order value

Implemented in StandardFolder, VirtualFolderType, InboxOutboxFolder, and UnknownFolderType.

getAdditionalColumns ( )

Returns an associative array of additional colums with the index the id of the column and their values as the localized names of the columns

Returns
array('col1' => _("Anfragestatus"))

Implemented in StandardFolder, VirtualFolderType, UnknownFolderType, and InboxOutboxFolder.

getContentForAdditionalColumn (   $column_index)

Returns the content for that additional column, if it exists. You can return null a string or a Flexi_Template as the content.

Parameters
string$column_index
Returns
null|string|Flexi_Template

Implemented in StandardFolder, VirtualFolderType, InboxOutboxFolder, and UnknownFolderType.

getEditTemplate ( )
getFiles ( )

Returns a list of files of this folder.

Returns
FileRef[] List of FileRef objects

Implemented in StandardFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, OutboxFolder, and InboxFolder.

getIcon (   $role)

Returns the name of the icon shape that shall be used with the FolderType implementation.

Parameters
string$rolerole of icon
Returns
Icon icon for the FolderType implementation.

Implemented in MessageFolder, CourseGroupFolder, TimedFolder, PublicFolder, VirtualFolderType, PermissionEnabledFolder, StandardFolder, UnknownFolderType, InboxOutboxFolder, HomeworkFolder, CourseDateFolder, PublicFolder, HiddenFolder, CoursePublicFolder, CourseTopicFolder, MaterialFolder, OutboxFolder, InboxFolder, and ResourceFolder.

getId ( )

Returns the ID of the folder that is managed from this FolderType instance.

Returns
string ID of the folder.

Implemented in MessageFolder, PublicFolder, StandardFolder, VirtualFolderType, InboxOutboxFolder, and UnknownFolderType.

getParent ( )

Returns the FolderType of the parent folder or null if this is the top folder.

Returns
null|FolderType

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, PublicFolder, InboxOutboxFolder, and RootFolder.

getSubfolders ( )

Returns a list of subfolders of this folder.

Returns
FolderType[] List of folder objects

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, and PublicFolder.

isEditable (   $user_id)

Determines if a user may have edit permissions for the folder.

Parameters
string$user_idThe user who wishes to edit the folder.
Returns
boolean True, if the user is permitted to edit the folder, false otherwise.

Implemented in MessageFolder, StandardFolder, VirtualFolderType, UnknownFolderType, PublicFolder, InboxOutboxFolder, ResourceFolder, and RootFolder.

isFileDownloadable (   $file_ref_id,
  $user_id 
)

Determines if a user may download the file.

Parameters
string$file_ref_idThe ID of the FileRef object of a file that shall be downloaded.
string$user_idThe user who wishes to download the file.
Returns
boolean True, if the user is permitted to download the file, false otherwise.

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, PublicFolder, CoursePublicFolder, ResourceFolder, HiddenFolder, PublicFolder, PermissionEnabledFolder, and MVVFolder.

isFileEditable (   $file_ref_id,
  $user_id 
)

Determines if a user may edit the file.

Parameters
string$file_ref_idThe ID of the FileRef object of a file that shall be edited.
string$user_idThe user who wishes to edit the file.
Returns
boolean True, if the user is permitted to edit the file, false otherwise.

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, PublicFolder, TimedFolder, PublicFolder, ResourceFolder, and HomeworkFolder.

isFileWritable (   $file_ref_id,
  $user_id 
)

Determines if a user may write to the file.

Parameters
string$file_idThe FileRef object of a file that shall be written.
string$user_idThe user who wishes to write to the file.
Returns
boolean True, if the user is permitted to write to the file, false otherwise.

Implemented in StandardFolder, MessageFolder, VirtualFolderType, UnknownFolderType, InboxOutboxFolder, PublicFolder, TimedFolder, PublicFolder, ResourceFolder, and HomeworkFolder.

isReadable (   $user_id)

Determines if a user may read the content of the folder.

Parameters
string$user_idThe user who wishes to read the folder's content.
Returns
boolean True, if the user is permitted to read the folder, false otherwise.

Implemented in MessageFolder, StandardFolder, VirtualFolderType, UnknownFolderType, PublicFolder, PublicFolder, CoursePublicFolder, InboxOutboxFolder, CourseGroupFolder, PermissionEnabledFolder, TimedFolder, ResourceFolder, and MVVFolder.

isSubfolderAllowed (   $user_id)

Determines if a user may create a subfolder in this folder.

Parameters
string$user_idThe user who wishes to create a subfolder.
Returns
boolean True, if the user is permitted to create a subfolder, false otherwise.

Implemented in MessageFolder, StandardFolder, VirtualFolderType, UnknownFolderType, PublicFolder, InboxOutboxFolder, CourseGroupFolder, ResourceFolder, PermissionEnabledFolder, HomeworkFolder, and MVVFolder.

isVisible (   $user_id)
isWritable (   $user_id)

Determines if a user may have write permissions for the folder.

Parameters
string$user_idThe user who wishes to write into the folder.
Returns
boolean True, if the user is permitted to write into the folder, false otherwise.

Implemented in MessageFolder, StandardFolder, VirtualFolderType, UnknownFolderType, PublicFolder, InboxOutboxFolder, CourseGroupFolder, TimedFolder, PermissionEnabledFolder, ResourceFolder, and RootFolder.

setDataFromEditTemplate (   $folderdata)

gets data from edit form

Parameters
ArrayAccess | Request$folderdata
Returns
FolderType|MessageBox FolderType instance on success, a MessageBox object with an error message on failure.

Implemented in MessageFolder, StandardFolder, PublicFolder, TimedFolder, InboxOutboxFolder, VirtualFolderType, PublicFolder, UnknownFolderType, CourseGroupFolder, CoursePublicFolder, ResourceFolder, CourseDateFolder, CourseTopicFolder, and HiddenFolder.

validateUpload ( FileType  $file,
  $user_id 
)

Validates a file upload.

Parameters
FileTypefile The file to be validated.
string$user_idThe ID of the user who uploaded the file.
Returns
string|null : error message or null if it was successful

Implemented in MessageFolder, StandardFolder, InboxOutboxFolder, VirtualFolderType, UnknownFolderType, and PermissionEnabledFolder.


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