Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
TimedFolder Class Reference
Inheritance diagram for TimedFolder:
PermissionEnabledFolder StandardFolder FolderType

Public Member Functions

 isVisible ($user_id=null)
 
 isReadable ($user_id=null)
 
 isWritable ($user_id=null)
 
 getIcon ($role=Icon::DEFAULT_ROLE)
 
 __construct ($folderdata=null)
 
 getDescriptionTemplate ()
 
 getEditTemplate ()
 
 setDataFromEditTemplate ($request)
 
 isFileEditable ($fileref_or_id, $user_id)
 
 isFileWritable ($fileref_or_id, $user_id)
 
- Public Member Functions inherited from PermissionEnabledFolder
 __construct ($folderdata=null)
 
 getPermissionString ()
 
 checkPermission ($perm, $user_id=null)
 
 getIcon ($role=Icon::DEFAULT_ROLE)
 
 isVisible ($user_id=null)
 
 isReadable ($user_id=null)
 
 isWritable ($user_id=null)
 
 isSubfolderAllowed ($user_id)
 
 getDescriptionTemplate ()
 
 validateUpload (FileType $uploadedfile, $user_id)
 
 getEditTemplate ()
 
 isFileDownloadable ($fileref_or_id, $user_id)
 
 copySettings ()
 
- 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 (FileType $newfile, $user_id)
 
 getSubfolders ()
 
 getFiles ()
 
 getParent ()
 
 addFile (FileType $file, $user_id=null)
 
 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 ()
 
 getAdditionalColumns ()
 
 getContentForAdditionalColumn ($column_index)
 
 getAdditionalColumnOrderWeigh ($column_index)
 
 getAdditionalActionButtons ()
 
 copySettings ()
 

Static Public Member Functions

static availableInRange ($range_id_or_object, $user_id)
 
static getTypeName ()
 
- Static Public Member Functions inherited from PermissionEnabledFolder
static availableInRange ($range_id_or_object, $user_id)
 
static getTypeName ()
 
- Static Public Member Functions inherited from StandardFolder
static getTypeName ()
 
static availableInRange ($range_id_or_object, $user_id)
 

Data Fields

 $start_time
 
 $end_time
 

Static Public Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from StandardFolder
 isVisibleNonRecursive ($user_id)
 
 getValidationMessages ($upload_type, $newfile)
 
- Protected Attributes inherited from PermissionEnabledFolder
 $permission = 7
 
 $perms = ['x' => 1
 
 $must_have_perm => 2, 'r' => 4, 'f' => 8]
 
- Protected Attributes inherited from StandardFolder
 $folderdata
 

Constructor & Destructor Documentation

__construct (   $folderdata = null)

TimedFolder constructor.

Parameters
array | null$folderdatadata to create folder with

Member Function Documentation

static availableInRange (   $range_id_or_object,
  $user_id 
)
static

Provides the ranges this folder type is available in for the given user. Doesn't really make sense in other contexts than a course.

Parameters
string$range_id_or_objectthe object (or object ID) to check for
$user_idthe user to check for (must have at least 'tutor' perm in given course)
Returns
bool available or not?

Implements FolderType.

getDescriptionTemplate ( )

Returns the description template for a instance of a TimedFolder type.

Returns
Flexi_Template A description template for a instance of the type TimedFolder

Implements FolderType.

getEditTemplate ( )

Returns the edit template for this folder type.

Returns
Flexi_Template

Implements FolderType.

getIcon (   $role = Icon::DEFAULT_ROLE)

This function returns the suitable Icon for this folder type (TimedFolder)

Returns
Icon The icon object for this folder type

Implements FolderType.

static getTypeName ( )
static

Returns the name of the TimedFolder type.

Returns
string the name of the TimedFolder type

Implements FolderType.

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

Implements FolderType.

isFileWritable (   $fileref_or_id,
  $user_id 
)

Checks if a user has write permissions to a file.

Parameters
FileRef | string$fileref_or_id
string$user_id
Returns
bool

Implements FolderType.

isReadable (   $user_id = null)

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.

Implements FolderType.

isVisible (   $user_id = null)

Is the current folder visible for the given user? That depends on parent folder visibility and time settings.

Parameters
string | null$user_idthe user to check visibility for
Returns
bool visible or not?

Implements FolderType.

isWritable (   $user_id = null)

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.

Implements FolderType.

setDataFromEditTemplate (   $request)

Stores the data which was edited in the edit template

Returns
mixed The template with the edited data

Implements FolderType.

Field Documentation

$end_time
$sorter = 5
static
$start_time

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