Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
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 (   $folder)

Member Function Documentation

__get (   $attribute)

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

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.

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 ( )
createSubfolder ( FolderType  $folderdata)

InboxOutboxFolders do not allow the creation of subfolders.

Implements FolderType.

delete ( )

Deletes the Folder object of an InboxOutboxFolder instance.

Returns
True on success, false on failure.

Implements FolderType.

deleteFile (   $file_ref_id)

InboxOutboxFolders do not allow deleting files.

Implements FolderType.

deleteSubfolder (   $subfolder_id)

InboxOutboxFolders do not allow deleting subfolders.

Implements FolderType.

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 (   $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 ( )

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 (   $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 ( )

InboxOutboxFolders don't have a description template.

Implements FolderType.

getEditTemplate ( )

InboxOutboxFolders do not have an edit template.

Implements FolderType.

getFiles ( )

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

Implements FolderType.

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

Returns the ID of the folder object of this InboxOutboxFolder.

Implements FolderType.

getParent ( )

Returns the parent InboxOutboxFolder.

Implements FolderType.

getSubfolders ( )

InboxOutboxFolders do not allow subfolders.

Implements FolderType.

static getTypeName ( )
static

Returns a localised name of the InboxOutboxFolder type.

Returns
string The localised name of this folder type.

Implements FolderType.

isEditable (   $user_id)

InboxOutboxFolders are not editable.

Implements FolderType.

isFileDownloadable (   $file_ref_id,
  $user_id 
)

Files are only downloadable for the owner.

Implements FolderType.

isFileEditable (   $file_ref_id,
  $user_id 
)

InboxOutboxFolders do not allow editing files.

Implements FolderType.

isFileWritable (   $file_ref_id,
  $user_id 
)

InboxOutboxFolders do not allow writing files.

Implements FolderType.

isReadable (   $user_id)

InboxOutboxFolders are only readable for the owner.

Implements FolderType.

isSubfolderAllowed (   $user_id)

InboxOutboxFolders do not allow subfolders.

Implements FolderType.

isVisible (   $user_id)

InboxOutboxFolders are only visible for the owner.

Implements FolderType.

isWritable (   $user_id)

InboxOutboxFolders are not writable.

Implements FolderType.

setDataFromEditTemplate (   $folderdata)

InboxOutboxFolders do not have an edit template.

Implements FolderType.

store ( )
Returns
bool

Implements FolderType.

validateUpload ( FileType  $file,
  $user_id 
)

InboxOutboxFolders do not allow uploads.

Implements FolderType.

Field Documentation

$folder
protected
$user = null
protected

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