Tariqa  3.0
 All Data Structures Namespaces Files Functions Variables Enumerations
UploadSection Class Reference
Inheritance diagram for UploadSection:
tariqa3ModuleSection tariqa3Module baseModule_RELEX_TARIQANG BaseModuleWithAuthenticationAndLanguages BaseModuleWithAuthentication BaseModule mModule

Public Member Functions

 __construct ($config, $parentBase, $section_id, $translationTable, $page, $tree_id, $root_folder= '', $title=null)
 getPageContent ()

Static Public Member Functions

static canUpload ($user, $folder, $config)
static getFolder ($page, $root_folder= '')
static m_rename ($source, $destination)
static m_unlink ($path)
static removeItem ($user, $page, $root_folder, $item_path, $translationTable, $config)
static createFolder ($user, $page, $root_folder, $name, $translationTable, $config)
static moveItem ($user, $page, $root_folder, $type, $source, $destination, $translationTable, $config)

Data Fields

const THEME_PAGE = 'theme'

Protected Attributes

 $tree_id = null

Constructor & Destructor Documentation

__construct ( config,
parentBase,
section_id,
translationTable,
page,
tree_id,
root_folder = '',
title = null 
)

Constructs the object

Parameters:
array$configThe configuration array
string$parentBasebase_folder of the container class
string$section_idThe section identifier
array$translationTableThe translation table
string$pageThe page in which the control will be displayed
string$tree_idThe tree HTML identifier
string$root_folderThe root folder of the uploads [OPTIONAL]
string$titleThe title of the document repository public
Returns:
void

Member Function Documentation

static canUpload ( user,
folder,
config 
) [static]

If true, then the user can modify the current folder

Parameters:
tariqaUser$userThe current user
string$folderThe folder
string$configThe application configuration array public
Returns:
boolean
static createFolder ( user,
page,
root_folder,
name,
translationTable,
config 
) [static]

Creates a new folder

Parameters:
tariqaUser$userThe user which is trying to create a new folder
string$pageThe current page in which the upload control is displayed
string$root_folderThe root folder (for example the theme id or the country id)
string$nameThe name of the new folder
array$translationTableThe translation table
string$configThe application configuration array public
Returns:
string
static getFolder ( page,
root_folder = '' 
) [static]

Retrieves the folder in which the upload will take place

Parameters:
string$pageThe page in which the control is displayed
string$root_folderThe root folder of the upload [OPTIONAL] public
Returns:
string

Render the module

Returns:
string

Reimplemented from tariqa3Module.

static m_rename ( source,
destination 
) [static]

Moves a folder from source to destination

Parameters:
string$sourceThe source path
string$destinationThe destination path public
Returns:
void
static m_unlink ( path) [static]

Removes a file or a folder

Parameters:
string$pathThe path to the item public
Returns:
int
static moveItem ( user,
page,
root_folder,
type,
source,
destination,
translationTable,
config 
) [static]

Moves an item

Parameters:
tariqaUser$userThe current user
string$pageThe current page in which the upload control is displayed
string$root_folderThe root folder (for example the theme id or the country id)
string$typeThe type of the source (file or folder)
string$sourceThe source
string$destinationThe destination
array$translationTableThe translation table
string$configThe application configuration array public
Returns:
string
static removeItem ( user,
page,
root_folder,
item_path,
translationTable,
config 
) [static]

Removes a file or a folder

Parameters:
tariqaUser$userThe user trying to perform the removal
string$pageThe page in which the controller is being displayed
string$root_folderThe root folder
string$item_pathThe path to the item to be deleted
array$translationTableThe translation table
array$configThe application configuration array public
Returns:
string

Field Documentation

$tree_id = null [protected]
const THEME_PAGE = 'theme'

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