Stud.IP  5.4
InboxOutboxFolder Class Reference
Inheritance diagram for InboxOutboxFolder:
FolderType InboxFolder OutboxFolder

Public Member Functions

 __construct ($folder)
 
 __get ($attribute)
 
 getIcon ($role=Icon::DEFAULT_ROLE)
 
 getId ()
 
 isVisible ($user_id)
 
 isReadable ($user_id)
 
 isWritable ($user_id)
 
 isEditable ($user_id)
 
 isSubfolderAllowed ($user_id)
 
 getDescriptionTemplate ()
 
 getParent ()
 
 getSubfolders ()
 
 getFiles ()
 
 getEditTemplate ()
 
 setDataFromEditTemplate ($folderdata)
 
 store ()
 
 validateUpload (FileType $file, $user_id)
 
 addFile (FileType $file, $user_id=null)
 
 deleteFile ($file_ref_id)
 
 createSubfolder (FolderType $folderdata)
 
 deleteSubfolder ($subfolder_id)
 
 delete ()
 
 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)
 

Protected Attributes

 $user = null
 
 $folder
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $folder)

Member Function Documentation

◆ __get()

__get (   $attribute)

Overloaded magic get method to get the attributes of the folder object.

◆ addFile()

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

Implements FolderType.

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

Implements FolderType.

◆ copySettings()

copySettings ( )

◆ createSubfolder()

createSubfolder ( FolderType  $folderdata)

InboxOutboxFolders do not allow the creation of subfolders.

Implements FolderType.

◆ delete()

delete ( )

Deletes the Folder object of an InboxOutboxFolder instance.

Returns
True on success, false on failure.

Implements FolderType.

◆ deleteFile()

deleteFile (   $file_ref_id)

InboxOutboxFolders do not allow deleting files.

Implements FolderType.

◆ deleteSubfolder()

deleteSubfolder (   $subfolder_id)

InboxOutboxFolders do not allow deleting subfolders.

Implements FolderType.

◆ getAdditionalActionButtons()

getAdditionalActionButtons ( )

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

Returns
array of Studip or Studip

Implements FolderType.

◆ getAdditionalColumnOrderWeigh()

getAdditionalColumnOrderWeigh (   $column_index)

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

Parameters
string$column_index
Returns
mixed : order value

Implements FolderType.

◆ getAdditionalColumns()

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"))

Implements FolderType.

◆ getContentForAdditionalColumn()

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

Implements FolderType.

◆ getDescriptionTemplate()

getDescriptionTemplate ( )

InboxOutboxFolders don't have a description template.

Implements FolderType.

◆ getEditTemplate()

getEditTemplate ( )

InboxOutboxFolders do not have an edit template.

Implements FolderType.

◆ getFiles()

getFiles ( )

InboxOutboxFolders do not contain any files since the InboxOutboxFolder type is not meant to be used directly.

Implements FolderType.

◆ getIcon()

getIcon (   $role = Icon::DEFAULT_ROLE)

Returns the Icon object for the InboxOutboxFolder type.

Returns
Icon An icon object with the icon for this folder type.

Implements FolderType.

◆ getId()

getId ( )

Returns the ID of the folder object of this InboxOutboxFolder.

Implements FolderType.

◆ getParent()

getParent ( )

Returns the parent InboxOutboxFolder.

Implements FolderType.

◆ getSubfolders()

getSubfolders ( )

InboxOutboxFolders do not allow subfolders.

Implements FolderType.

◆ getTypeName()

static getTypeName ( )
static

Returns a localised name of the InboxOutboxFolder type.

Returns
string The localised name of this folder type.

Implements FolderType.

◆ isEditable()

isEditable (   $user_id)

InboxOutboxFolders are not editable.

Implements FolderType.

◆ isFileDownloadable()

isFileDownloadable (   $file_ref_id,
  $user_id 
)

Files are only downloadable for the owner.

Implements FolderType.

◆ isFileEditable()

isFileEditable (   $file_ref_id,
  $user_id 
)

InboxOutboxFolders do not allow editing files.

Implements FolderType.

◆ isFileWritable()

isFileWritable (   $file_ref_id,
  $user_id 
)

InboxOutboxFolders do not allow writing files.

Implements FolderType.

◆ isReadable()

isReadable (   $user_id)

InboxOutboxFolders are only readable for the owner.

Implements FolderType.

◆ isSubfolderAllowed()

isSubfolderAllowed (   $user_id)

InboxOutboxFolders do not allow subfolders.

Implements FolderType.

◆ isVisible()

isVisible (   $user_id)

InboxOutboxFolders are only visible for the owner.

Implements FolderType.

◆ isWritable()

isWritable (   $user_id)

InboxOutboxFolders are not writable.

Implements FolderType.

◆ setDataFromEditTemplate()

setDataFromEditTemplate (   $folderdata)

InboxOutboxFolders do not have an edit template.

Implements FolderType.

◆ store()

store ( )
Returns
bool

Implements FolderType.

◆ validateUpload()

validateUpload ( FileType  $file,
  $user_id 
)

InboxOutboxFolders do not allow uploads.

Implements FolderType.

Field Documentation

◆ $folder

$folder
protected

◆ $user

$user = null
protected

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