Admidio API
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Packages

  • com
    • tecnick
      • tcpdf
  • None
  • PHPMailer
    • easypeasyics
  • PHPWavUtils
  • Securimage
    • classes

Classes

  • AutoLogin
  • Component
  • ComponentUpdate
  • ConditionParser
  • Database
  • DateTimeExtended
  • Email
  • Folder
  • FormValidation
  • FunctionClass
  • Htaccess
  • HtmlDiv
  • HtmlElement
  • HtmlForm
  • HtmlFormBasic
  • HtmlFormInstallation
  • HtmlList
  • HtmlNavbar
  • HtmlPage
  • HtmlTable
  • HtmlTableBasic
  • Image
  • Inventory
  • InventoryFields
  • Language
  • LanguageData
  • ListConfiguration
  • Menu
  • Message
  • ModuleAnnouncements
  • ModuleDates
  • ModuleLists
  • ModuleMenu
  • ModuleMessages
  • Modules
  • ModuleWeblinks
  • MyFiles
  • Navigation
  • ntlm_sasl_client_class
  • Organization
  • Participants
  • PasswordHash
  • PasswordHashing
  • ProfileFields
  • RoleDependency
  • RolesRights
  • RSSfeed
  • Session
  • SystemMail
  • TableAccess
  • TableAnnouncement
  • TableCategory
  • TableDate
  • TableFile
  • TableFolder
  • TableGuestbook
  • TableGuestbookComment
  • TableInventory
  • TableInventoryField
  • TableLists
  • TableMembers
  • TableMessage
  • TablePhotos
  • TableRoles
  • TableRooms
  • TableText
  • TableUserField
  • TableUsers
  • TableWeblink
  • UploadHandlerDownload
  • UploadHandlerPhoto
  • User
  • UserRegistration

Exceptions

  • AdmException
  • WavFileException
  • WavFormatException

Functions

  • admFuncAutoload
  • admFuncGeneratePagination
  • admFuncGetBytesFromSize
  • admFuncGetDirectoryEntries
  • admFuncMaxUploadSize
  • admFuncProcessableImageSize
  • admFuncShowCreateChangeInfoById
  • admFuncShowCreateChangeInfoByName
  • admFuncVariableIsValid
  • admReadTemplateFile
  • admStrIsValidFileName
  • admStrStripTagsSpecial
  • admStrToLower
  • admStrToUpper
  • bzip2Version
  • checkDatabaseVersion
  • checkPhpVersion
  • EmailAttachment
  • FileSizeNiceDisplay
  • FormattedTimeRemaining
  • FunctionIsDisabled
  • getFormerRolesFromDatabase
  • getFutureRolesFromDatabase
  • getmicrotime
  • getRoleMemberships
  • getRolesFromDatabase
  • gzipVersion
  • hasRole
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • htmLawed
  • HTMLFilter
  • isGroupLeader
  • isMember
  • kses
  • kses_hook
  • MySQLdumpVersion
  • OutputInformation
  • SafeExec
  • showNotice
  • strAddSlashesDeep
  • strNextLetter
  • strStripSlashesDeep
  • strStripTags
  • strValidCharacters
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • version_compare_replacement
  • version_compare_replacement_sub

Class TableFolder

TableAccess
Extended by TableFolder
Copyright: 2004-2016 The Admidio Team
License: GNU General Public License v2.0 only **********************************************************************************************
Class:

TableFolder Diese Klasse dient dazu ein Folderobjekt zu erstellen. Ein Ordner kann ueber diese Klasse in der Datenbank verwaltet werden


Located at tablefolder.php

Methods summary

public
# __construct( Database & $database, integer $folderId = 0 )

Constructor that will create an object of a recordset of the table adm_folders. If the id is set than the specific folder will be loaded.

Constructor that will create an object of a recordset of the table adm_folders. If the id is set than the specific folder will be loaded.

Parameters

$database
Object of the class Database. This should be the default global object @b $gDb.
$folderId
The recordset of the folder with this id will be loaded. If id isn't set than an empty object of the table is created.

Overrides

TableAccess::__construct
public
# addRolesOnFolder( string $rolesRightNameIntern, array $rolesArray, integer $folderId = 0 )

Add all roles of the array to the current folder and all of the subfolders. The roles will be assigned to the right that was set through parameter $rolesRightNameIntern.

Add all roles of the array to the current folder and all of the subfolders. The roles will be assigned to the right that was set through parameter $rolesRightNameIntern.

Parameters

$rolesRightNameIntern
Name of the right where the roles should be added
$rolesArray
$folderId
public string[]
# createFolder( string $folderName )

Legt einen neuen Ordner im Dateisystem an

Legt einen neuen Ordner im Dateisystem an

Parameters

$folderName

Returns

string[]
public boolean
# delete( integer $folderId = 0 )

Deletes the selected record of the table and all references in other tables. Also all files, subfolders and the selected folder will be deleted in the file system. After that the class will be initialize.

Deletes the selected record of the table and all references in other tables. Also all files, subfolders and the selected folder will be deleted in the file system. After that the class will be initialize.

Parameters

$folderId

Returns

boolean
@b true if no error occurred

Overrides

TableAccess::delete
public
# editLockedFlagOnFolder( boolean $lockedFlag, integer $folderId = 0 )

Setzt das Lockedflag (0 oder 1) auf einer vorhandenen Ordnerinstanz und allen darin enthaltenen Unterordnern und Dateien rekursiv

Setzt das Lockedflag (0 oder 1) auf einer vorhandenen Ordnerinstanz und allen darin enthaltenen Unterordnern und Dateien rekursiv

Parameters

$lockedFlag
$folderId
public
# editPublicFlagOnFolder( boolean $publicFlag, integer $folderId = 0 )

Set the public flag to a folder and all subfolders.

Set the public flag to a folder and all subfolders.

Parameters

$publicFlag
If set to @b 1 then all users could see this folder.
$folderId
The id of the folder where the public flag should be set.
public static string
# getRootFolderName( )

Create a unique folder name for the root folder of the download module that contains the shortname of the current organization

Create a unique folder name for the root folder of the download module that contains the shortname of the current organization

Returns

string
Returns the root foldername for the download module.
public true
# getFolderForDownload( integer $folderId )

Reads the folder recordset from database table @b adm_folders and throws an AdmException if the user has no right to see the folder or the folder id doesn't exists.

Reads the folder recordset from database table @b adm_folders and throws an AdmException if the user has no right to see the folder or the folder id doesn't exists.

Parameters

$folderId
The id of the folder. If the id is 0 then the root folder will be shown.

Returns

true
Returns @b true if everything is ok otherwise an AdmException is thrown.

Throws

AdmException
public array[]
# getFolderContentsForDownload( )

Inhalt des aktuellen Ordners, abhaengig von den Benutzerrechten, als Array zurueckliefern...

Inhalt des aktuellen Ordners, abhaengig von den Benutzerrechten, als Array zurueckliefern...

Returns

array[]
public string
# getCompletePathOfFolder( )

Gibt den kompletten Pfad des Ordners zurueck

Gibt den kompletten Pfad des Ordners zurueck

Returns

string
public string
# getNavigationForDownload( integer $folderId = 0, string $currentNavigation = '' )

Gibt fuer das Downloadmodul eine HTML-Navigationsleiste fuer die Ordner zurueck

Gibt fuer das Downloadmodul eine HTML-Navigationsleiste fuer die Ordner zurueck

Parameters

$folderId
$currentNavigation

Returns

string
public int[]
# getRoleViewArrayOfFolder( )

Returns an array with all roles ids that have the right to view the folder.

Returns an array with all roles ids that have the right to view the folder.

Returns

int[]
Returns an array with all role ids that have the right to view the folder.
public int[]
# getRoleUploadArrayOfFolder( )

Returns an array with all roles ids that have the right to upload files to the folder.

Returns an array with all roles ids that have the right to upload files to the folder.

Returns

int[]
Returns an array with all role ids that have the right to upload files to the folder.
public mixed
# getValue( string $columnName, string $format = '' )

Get the value of a column of the database table. If the value was manipulated before with @b setValue than the manipulated value is returned.

Get the value of a column of the database table. If the value was manipulated before with @b setValue than the manipulated value is returned.

Parameters

$columnName
The name of the database column whose value should be read
$format

For date or timestamp columns the format should be the date/time format e.g. @b d.m.Y = '02.04.2011'. @n For text columns the format can be @b database that would return the original database value without any transformations

Returns

mixed

Returns the value of the database column. If the value was manipulated before with @b setValue than the manipulated value is returned.

Overrides

TableAccess::getValue
public boolean
# hasUploadRight( )

Checks if the current user has the right to upload files to the current folder.

Checks if the current user has the right to upload files to the current folder.

Returns

boolean
Return @b true if the user has the right to upload files
public boolean
# hasViewRight( )

Checks if the current user has the right to view files of the current folder.

Checks if the current user has the right to view files of the current folder.

Returns

boolean
Return @b true if the user has the right to view files
protected boolean
# readData( string $sqlWhereCondition )

Reads a record out of the table in database selected by the conditions of the param @b $sqlWhereCondition out of the table. If the sql will find more than one record the method returns @b false. Per default all columns of the default table will be read and stored in the object.

Reads a record out of the table in database selected by the conditions of the param @b $sqlWhereCondition out of the table. If the sql will find more than one record the method returns @b false. Per default all columns of the default table will be read and stored in the object.

Parameters

$sqlWhereCondition
Conditions for the table to select one record

Returns

boolean
Returns @b true if one record is found

See

TableAccess#readDataById
TableAccess#readDataByColumns

Overrides

TableAccess::readData
public
# removeRolesOnFolder( string $rolesRightNameIntern, array $rolesArray, integer $folderId = 0 )

Remove all roles of the array from the current folder and all of the subfolders. The roles will be removed from the right that was set through parameter $rolesRightNameIntern.

Remove all roles of the array from the current folder and all of the subfolders. The roles will be removed from the right that was set through parameter $rolesRightNameIntern.

Parameters

$rolesRightNameIntern
Name of the right where the roles should be removed
$rolesArray
$folderId
public
# rename( string $newName, string $newPath, integer $folderId = 0 )

Benennt eine Ordnerinstanz um und sorgt dafür das bei allen Unterordnern der Pfad angepasst wird

Benennt eine Ordnerinstanz um und sorgt dafür das bei allen Unterordnern der Pfad angepasst wird

Parameters

$newName
$newPath
$folderId
public boolean
# save( boolean $updateFingerPrint = true )

Save all changed columns of the recordset in table of database. Therefore the class remembers if it's a new record or if only an update is necessary. The update statement will only update the changed columns. If the table has columns for creator or editor than these column with their timestamp will be updated. For new records the user, organization and timestamp will be set per default.

Save all changed columns of the recordset in table of database. Therefore the class remembers if it's a new record or if only an update is necessary. The update statement will only update the changed columns. If the table has columns for creator or editor than these column with their timestamp will be updated. For new records the user, organization and timestamp will be set per default.

Parameters

$updateFingerPrint
Default @b true. Will update the creator or editor of the recordset if table has columns like @b usr_id_create or @b usr_id_changed

Returns

boolean
If an update or insert into the database was done then return true, otherwise false.

Overrides

TableAccess::save

Methods inherited from TableAccess

__sleep(), clear(), connectAdditionalTable(), countAllRecords(), hasColumnsValueChanged(), isNewRecord(), readDataByColumns(), readDataById(), setArray(), setDatabase(), setValue()

Properties summary

protected $folderPath
#
protected $folderViewRolesObject
#
protected $folderUploadRolesObject
#

Properties inherited from TableAccess

$additionalTables, $columnPrefix, $columnsInfos, $columnsValueChanged, $db, $dbColumns, $keyColumnName, $new_record, $tableName

Admidio API API documentation generated by ApiGen