DownloadsLibrary
in package
Digital Asset Management Library
Tags
Table of Contents
Properties
- $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
Methods
- __construct() : mixed
- 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
- getOutputLocale() : Locale
- Get locale in which output shall be parsed for
- getPrettyFormatFileName() : string
- Format a filename according to configuration option 'Pretty format' of currently loaded downloads file.
- getSettings() : mixed
- parseSettingsDropDown() : null
- parse the settings dropdown
- getApplicationPage() : Page
- Find best matching application
- getCategoryMenu() : mixed
- getDownloadMimeTypeMenu() : mixed
- 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
- initSettings() : mixed
- parseCategoryTreeForDownloadAssociation() : mixed
- parseCategoryTreeForMenu() : mixed
Properties
$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
Methods
__construct()
public
__construct() : mixed
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
stringgetOutputLocale()
Get locale in which output shall be parsed for
public
static getOutputLocale() : Locale
Return values
LocalegetPrettyFormatFileName()
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
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
nullgetApplicationPage()
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.
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
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
initSettings()
private
initSettings() : 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