DownloadsManager
extends DownloadsLibrary
in package
DownloadsManager
Tags
Table of Contents
Properties
- $_pageTitle : string
- Page title
- $objTemplate : Sigma
- Template object
- $arrConfig : mixed
- $arrPermissionTypes : mixed
- $categoriesSortingOptions : array<string|int, mixed>
- Categories setting option
- $defaultCategoryImage : mixed
- $defaultDownloadImage : mixed
- $downloadsSortingOptions : array<string|int, mixed>
- Downloads setting option
- $outputLocale : Locale
- The locale in which the output shall be parsed for
- $searchKeyword : mixed
- $act : mixed
- $arrPermissionDependencies : mixed
- $arrStatusMsg : array<string|int, mixed>
- Contains the info messages about done operations
- $parentCategoryId : mixed
Methods
- __construct() : mixed
- PHP5 constructor
- _placeholder() : mixed
- placeholder
- clearEsiCache() : mixed
- Clear Esi Cache content
- enhanceUrlForDownload() : mixed
- Enhance $url into a download-url for $download.
- getApplicationUrl() : Url
- Get URL pointing to an application page of this component
- getGroupById() : string
- Get Group content by group id
- getMediaBrowserButton() : mixed
- Mediabrowser integrated into the downloads modules.
- getOutputLocale() : Locale
- Get locale in which output shall be parsed for
- getPage() : mixed
- Set the backend page
- getPrettyFormatFileName() : string
- Format a filename according to configuration option 'Pretty format' of currently loaded downloads file.
- getSettings() : mixed
- parseEmailTemplates() : mixed
- Parse Email Templates
- parseSettingsDropDown() : null
- parse the settings dropdown
- filterArray() : array<string|int, mixed>
- Removes given array elements from provided array
- getApplicationPage() : Page
- Find best matching application
- getCategoryElement() : string
- Get a span tag with the category name. If the parameter contains a long and a short category name, the long name will be added as title attribute. The short name is used as content for the span tag.
- getCategoryMenu() : mixed
- getDownloadMimeTypeMenu() : mixed
- getParentCategoryNamesByChild() : mixed
- Get the name of the child category and all names of the parent categories
- getParsedCategoryListForDownloadAssociation() : mixed
- getParsedUsername() : mixed
- getUserDropDownMenu() : mixed
- getValidityMenu() : mixed
- initDefaultCategoryImage() : mixed
- initDefaultDownloadImage() : mixed
- initOutputLocale() : mixed
- Determine the locale in which the output shall be parsed for.
- initSearch() : mixed
- updateSettings() : mixed
- addDownloadsToCategory() : mixed
- categories() : mixed
- categories list
- category() : mixed
- category edit
- deleteCategories() : mixed
- deleteCategory() : mixed
- deleteDownload() : mixed
- deleteDownloads() : mixed
- deleteGroup() : mixed
- deleteGroups() : mixed
- download() : mixed
- downloads() : mixed
- getDownload() : mixed
- group() : mixed
- groups() : mixed
- initSettings() : mixed
- loadCategoryNavigation() : mixed
- loadDownloadNavigation() : mixed
- loadGroupNavigation() : mixed
- overview() : mixed
- parseCategories() : mixed
- parseCategoryDownloads() : mixed
- parseCategoryNavigation() : mixed
- parseCategoryTreeForDownloadAssociation() : mixed
- parseCategoryTreeForMenu() : mixed
- parseDownloadNavigation() : mixed
- parseGroupNavigation() : mixed
- setNavigation() : mixed
- settings() : mixed
- Settings page
- switchCategoryStatus() : mixed
- switchDownloadStatus() : mixed
- switchGroupStatus() : mixed
- unlinkDownloadFromCategory() : mixed
- unlinkDownloadsFromCategory() : mixed
- updateCategoryOrder() : mixed
- updateDownloadOrder() : mixed
Properties
$_pageTitle
Page title
public
string
$_pageTitle
Tags
$objTemplate
Template object
public
Sigma
$objTemplate
Tags
$arrConfig
protected
mixed
$arrConfig
= array('overview_cols_count' => 2, 'overview_max_subcats' => 5, 'use_attr_metakeys' => 1, 'use_attr_size' => 1, 'use_attr_license' => 1, 'use_attr_version' => 1, 'use_attr_author' => 1, 'use_attr_website' => 1, 'most_viewed_file_count' => 5, 'most_downloaded_file_count' => 5, 'most_popular_file_count' => 5, 'newest_file_count' => 5, 'updated_file_count' => 5, 'new_file_time_limit' => 604800, 'updated_file_time_limit' => 604800, 'associate_user_to_groups' => '', 'list_downloads_current_lang' => 1, 'integrate_into_search_component' => 1, 'auto_file_naming' => 'off', 'pretty_regex_pattern' => '', 'global_search_linking' => 'detail')
$arrPermissionTypes
protected
mixed
$arrPermissionTypes
= array('getReadAccessId' => 'read', 'getAddSubcategoriesAccessId' => 'add_subcategories', 'getManageSubcategoriesAccessId' => 'manage_subcategories', 'getAddFilesAccessId' => 'add_files', 'getManageFilesAccessId' => 'manage_files')
$categoriesSortingOptions
Categories setting option
protected
array<string|int, mixed>
$categoriesSortingOptions
= array('custom' => array('order' => 'ASC', 'name' => 'ASC', 'id' => 'ASC'), 'alphabetic' => array('name' => 'ASC', 'id' => 'ASC'))
$defaultCategoryImage
protected
mixed
$defaultCategoryImage
= array()
$defaultDownloadImage
protected
mixed
$defaultDownloadImage
= array()
$downloadsSortingOptions
Downloads setting option
protected
array<string|int, mixed>
$downloadsSortingOptions
= array('custom' => array('order' => 'ASC', 'name' => 'ASC', 'id' => 'ASC'), 'alphabetic' => array('name' => 'ASC', 'id' => 'ASC'), 'newestToOldest' => array('ctime' => 'DESC', 'id' => 'ASC'), 'oldestToNewest' => array('ctime' => 'ASC', 'id' => 'ASC'))
$outputLocale
The locale in which the output shall be parsed for
protected
static Locale
$outputLocale
$searchKeyword
protected
mixed
$searchKeyword
$act
private
mixed
$act
= ''
$arrPermissionDependencies
private
mixed
$arrPermissionDependencies
= array('read' => array('add_subcategories' => array('manage_subcategories' => null), 'add_files' => array('manage_files' => null)))
$arrStatusMsg
Contains the info messages about done operations
private
array<string|int, mixed>
$arrStatusMsg
= array('ok' => array(), 'error' => array())
Tags
$parentCategoryId
private
mixed
$parentCategoryId
= 0
Methods
__construct()
PHP5 constructor
public
__construct() : mixed
Tags
_placeholder()
placeholder
public
_placeholder() : mixed
Tags
clearEsiCache()
Clear Esi Cache content
public
static clearEsiCache() : mixed
enhanceUrlForDownload()
Enhance $url into a download-url for $download.
public
static enhanceUrlForDownload(Url $url, Download $download[, string $disposition = HTTP_DOWNLOAD_ATTACHMENT ]) : mixed
Parameters
getApplicationUrl()
Get URL pointing to an application page of this component
public
static getApplicationUrl([mixed $categories = array() ]) : Url
If one or more IDs of categories are supplied, then it will try to point to an application identified by an ID of a category as its CMD.
Parameters
- $categories : mixed = array()
Tags
Return values
Url —URL pointing to an application page of this component
getGroupById()
Get Group content by group id
public
getGroupById(int $id, int $langId) : string
Parameters
- $id : int
-
group id
- $langId : int
-
Language id
Return values
stringgetMediaBrowserButton()
Mediabrowser integrated into the downloads modules.
public
static getMediaBrowserButton(mixed $id[, mixed $type = 'filebrowser' ]) : mixed
Parameters
- $id : mixed
- $type : mixed = 'filebrowser'
Tags
getOutputLocale()
Get locale in which output shall be parsed for
public
static getOutputLocale() : Locale
Return values
LocalegetPage()
Set the backend page
public
getPage() : mixed
Tags
getPrettyFormatFileName()
Format a filename according to configuration option 'Pretty format' of currently loaded downloads file.
public
getPrettyFormatFileName(string $fileName) : string
Parameters
- $fileName : string
-
The filename to pretty format
Return values
string —The pretty formatted filename. In case of any error or if the function to pretty format is disabled, then the original $filename is being returned.
getSettings()
public
getSettings() : mixed
parseEmailTemplates()
Parse Email Templates
public
parseEmailTemplates() : mixed
parseSettingsDropDown()
parse the settings dropdown
public
parseSettingsDropDown(object $objTemplate, array<string|int, mixed> $settingValues, string $selected, string $blockName) : null
Parameters
- $objTemplate : object
-
template object
- $settingValues : array<string|int, mixed>
-
array of setting values
- $selected : string
-
selected dropdown value
- $blockName : string
-
block name for template parsing
Return values
nullfilterArray()
Removes given array elements from provided array
protected
filterArray(array<string|int, mixed> $filter, array<string|int, mixed> $unfilteredArray) : array<string|int, mixed>
Parameters
- $filter : array<string|int, mixed>
-
Array of element to delete from $unfilteredArray
- $unfilteredArray : array<string|int, mixed>
-
Array to be filtered
Return values
array<string|int, mixed>getApplicationPage()
Find best matching application
protected
static getApplicationPage([array<string|int, mixed> $categoryIds = array() ]) : Page
If one or more IDs of categories are supplied, then it will try to find an application identified by an ID of a category as its CMD.
Parameters
- $categoryIds : array<string|int, mixed> = array()
-
Array of category IDs to look for a matching application page for.
Tags
Return values
Page —An application page of this component.
getCategoryElement()
Get a span tag with the category name. If the parameter contains a long and a short category name, the long name will be added as title attribute. The short name is used as content for the span tag.
protected
getCategoryElement(array<string|int, mixed> $category) : string
If the parameter only contains category names, the category names are listed one below the other in the title attribute. The content of the span tag consists of three dots.
Parameters
- $category : array<string|int, mixed>
-
with long and short category name or only names
Return values
string —a span tag or an empty string
getCategoryMenu()
protected
getCategoryMenu(mixed $accessType, mixed $selectedCategory, mixed $selectionText[, mixed $attrs = null ][, mixed $categoryId = null ]) : mixed
Parameters
- $accessType : mixed
- $selectedCategory : mixed
- $selectionText : mixed
- $attrs : mixed = null
- $categoryId : mixed = null
getDownloadMimeTypeMenu()
protected
getDownloadMimeTypeMenu(mixed $selectedType) : mixed
Parameters
- $selectedType : mixed
getParentCategoryNamesByChild()
Get the name of the child category and all names of the parent categories
protected
getParentCategoryNamesByChild(Category $child, array<string|int, mixed> &$names) : mixed
Parameters
- $child : Category
-
child category
- $names : array<string|int, mixed>
-
previous category names for recursion
getParsedCategoryListForDownloadAssociation()
protected
getParsedCategoryListForDownloadAssociation() : mixed
getParsedUsername()
protected
getParsedUsername(mixed $userId) : mixed
Parameters
- $userId : mixed
getUserDropDownMenu()
protected
getUserDropDownMenu(mixed $selectedUserId, mixed $userId) : mixed
Parameters
- $selectedUserId : mixed
- $userId : mixed
getValidityMenu()
protected
getValidityMenu(mixed $validity, mixed $expirationDate) : mixed
Parameters
- $validity : mixed
- $expirationDate : mixed
initDefaultCategoryImage()
protected
initDefaultCategoryImage() : mixed
initDefaultDownloadImage()
protected
initDefaultDownloadImage() : mixed
initOutputLocale()
Determine the locale in which the output shall be parsed for.
protected
static initOutputLocale() : mixed
initSearch()
protected
initSearch() : mixed
updateSettings()
protected
updateSettings() : mixed
addDownloadsToCategory()
private
addDownloadsToCategory() : mixed
categories()
categories list
private
categories() : mixed
Tags
category()
category edit
private
category() : mixed
Tags
deleteCategories()
private
deleteCategories(mixed $arrCategoryIds[, mixed $recursive = false ]) : mixed
Parameters
- $arrCategoryIds : mixed
- $recursive : mixed = false
deleteCategory()
private
deleteCategory() : mixed
deleteDownload()
private
deleteDownload() : mixed
deleteDownloads()
private
deleteDownloads(mixed $arrDownloadIds) : mixed
Parameters
- $arrDownloadIds : mixed
deleteGroup()
private
deleteGroup() : mixed
deleteGroups()
private
deleteGroups(mixed $arrGroupsIds) : mixed
Parameters
- $arrGroupsIds : mixed
download()
private
download() : mixed
downloads()
private
downloads() : mixed
getDownload()
private
getDownload() : mixed
group()
private
group() : mixed
groups()
private
groups() : mixed
initSettings()
private
initSettings() : mixed
loadCategoryNavigation()
private
loadCategoryNavigation() : mixed
loadDownloadNavigation()
private
loadDownloadNavigation() : mixed
loadGroupNavigation()
private
loadGroupNavigation() : mixed
overview()
private
overview() : mixed
parseCategories()
private
parseCategories(mixed $objCategory, mixed $downloadOrderBy, mixed $downloadOrderDirection, mixed $downloadLimitOffset, mixed $categoryOrderBy, mixed $categoryOrderDirection, mixed $categoryLimitOffset) : mixed
Parameters
- $objCategory : mixed
- $downloadOrderBy : mixed
- $downloadOrderDirection : mixed
- $downloadLimitOffset : mixed
- $categoryOrderBy : mixed
- $categoryOrderDirection : mixed
- $categoryLimitOffset : mixed
parseCategoryDownloads()
private
parseCategoryDownloads(mixed $objCategory, mixed $downloadOrderBy, mixed $downloadOrderDirection, mixed $downloadLimitOffset, mixed $categoryOrderBy, mixed $categoryOrderDirection, mixed $categoryLimitOffset, mixed $searchTerm) : mixed
Parameters
- $objCategory : mixed
- $downloadOrderBy : mixed
- $downloadOrderDirection : mixed
- $downloadLimitOffset : mixed
- $categoryOrderBy : mixed
- $categoryOrderDirection : mixed
- $categoryLimitOffset : mixed
- $searchTerm : mixed
parseCategoryNavigation()
private
parseCategoryNavigation() : mixed
parseCategoryTreeForDownloadAssociation()
private
parseCategoryTreeForDownloadAssociation(mixed &$arrCategories[, mixed $parentId = 0 ][, mixed $level = 0 ][, mixed $parentName = '' ]) : mixed
Parameters
- $arrCategories : mixed
- $parentId : mixed = 0
- $level : mixed = 0
- $parentName : mixed = ''
parseCategoryTreeForMenu()
private
parseCategoryTreeForMenu(mixed &$arrCategories, mixed $selectedCategory[, mixed $categoryId = null ][, mixed $parentId = 0 ][, mixed $level = 0 ]) : mixed
Parameters
- $arrCategories : mixed
- $selectedCategory : mixed
- $categoryId : mixed = null
- $parentId : mixed = 0
- $level : mixed = 0
parseDownloadNavigation()
private
parseDownloadNavigation() : mixed
parseGroupNavigation()
private
parseGroupNavigation() : mixed
setNavigation()
private
setNavigation() : mixed
settings()
Settings page
private
settings() : mixed
Tags
switchCategoryStatus()
private
switchCategoryStatus() : mixed
switchDownloadStatus()
private
switchDownloadStatus() : mixed
switchGroupStatus()
private
switchGroupStatus() : mixed
unlinkDownloadFromCategory()
private
unlinkDownloadFromCategory() : mixed
unlinkDownloadsFromCategory()
private
unlinkDownloadsFromCategory(mixed $objCategory, mixed $arrUnlinkDownloadIds) : mixed
Parameters
- $objCategory : mixed
- $arrUnlinkDownloadIds : mixed
updateCategoryOrder()
private
updateCategoryOrder(mixed $arrCategoryOrder) : mixed
Parameters
- $arrCategoryOrder : mixed
Tags
updateDownloadOrder()
private
updateDownloadOrder(mixed $arrDownloadOrder) : mixed
Parameters
- $arrDownloadOrder : mixed