| Next revision | Previous revision |
| scriptlog:lib:controller:downloadadmincontroller [2026/09/26 09:09] – admin admin | scriptlog:lib:controller:downloadadmincontroller [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= Docblock Metadata ======= | ======= Docblock Metadata ======= |
| |
| ^ Tag ^ Value ^ | ^ Tag ^ Value ^ |
| | ''@category'' | Controller Class | | | ''@category'' | Controller Class | |
| | ''@author'' | M.Noermoehammad | | | ''@author'' | M.Noermoehammad | |
| | ''@license'' | MIT | | | ''@license'' | MIT | |
| | ''@version'' | 1.0 | | | ''@version'' | 1.0 | |
| | ''@since'' | Since Release 1.0 | | | ''@since'' | Since Release 1.0 | |
| |
| ======= Inheritance ======= | ======= Inheritance ======= |
| |
| ^ Relation ^ Type ^ Meaning ^ | ^ Relation ^ Type ^ Meaning ^ |
| | extends | [[scriptlog:lib:core:baseapp|''BaseApp'']] | parent class/interface | | | extends | [[scriptlog:lib:core:baseapp|''BaseApp'']] | parent class/interface | |
| |
| ======= Constants (0) ======= | ======= Constants (0) ======= |
| //None.// | //None.// |
| |
| ======= Properties (0) ======= | ======= Properties (2) ======= |
| |
| //None declared.// | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | | ''private'' | ''(untyped)'' | ''$downloadService'' | | 27 | |
| | | ''private'' | ''(untyped)'' | ''$view'' | | 28 | |
| |
| ======= Methods (22) ======= | ======= Methods (22) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public | ''__construct()'' | (undocumented) | 30 | | | public | ''__construct()'' | (undocumented) | 30 | |
| | public | ''listItems()'' | List all downloads - displays download management page | 38 | | | public | ''listItems()'' | List all downloads - displays download management page | 38 | |
| | public | ''viewStatistics()'' | View download statistics | 114 | | | public | ''viewStatistics()'' | View download statistics | 114 | |
| | public | ''viewDownloadHistory()'' | View download history | 124 | | | public | ''viewDownloadHistory()'' | View download history | 124 | |
| | public | ''getDownloadHistoryForMedia()'' | Get download history for AJAX | 135 | | | public | ''getDownloadHistoryForMedia()'' | Get download history for AJAX | 135 | |
| | public | ''expireDownload()'' | Expire a single download | 146 | | | public | ''expireDownload()'' | Expire a single download | 146 | |
| | public | ''regenerateDownload()'' | Regenerate a single download | 157 | | | public | ''regenerateDownload()'' | Regenerate a single download | 157 | |
| | public | ''deleteDownload()'' | Delete a single download | 168 | | | public | ''deleteDownload()'' | Delete a single download | 168 | |
| | public | ''bulkExpireDownloads()'' | Bulk expire downloads | 178 | | | public | ''bulkExpireDownloads()'' | Bulk expire downloads | 178 | |
| | public | ''bulkRegenerateDownloads()'' | Bulk regenerate downloads | 194 | | | public | ''bulkRegenerateDownloads()'' | Bulk regenerate downloads | 194 | |
| | public | ''bulkDeleteDownloads()'' | Bulk delete downloads | 210 | | | public | ''bulkDeleteDownloads()'' | Bulk delete downloads | 210 | |
| | public | ''createDownloadLink()'' | Create a new download link for a media file | 228 | | | public | ''createDownloadLink()'' | Create a new download link for a media file | 228 | |
| | public | ''bulkCreateDownloadLinks()'' | Bulk create download links for media IDs | 239 | | | public | ''bulkCreateDownloadLinks()'' | Bulk create download links for media IDs | 239 | |
| | private | ''getIdentifiersFromPost()'' | Get identifiers from POST data | 256 | | | private | ''getIdentifiersFromPost()'' | Get identifiers from POST data | 256 | |
| | public | ''getRecentDownloads()'' | Get recent downloads | 273 | | | public | ''getRecentDownloads()'' | Get recent downloads | 273 | |
| | public | ''getFileTypeDistribution()'' | Get file type distribution | 283 | | | public | ''getFileTypeDistribution()'' | Get file type distribution | 283 | |
| | public | ''getDownloadHistory()'' | Get download history | 294 | | | public | ''getDownloadHistory()'' | Get download history | 294 | |
| | public | ''viewDownloadHistoryPage()'' | Render download history page | 307 | | | public | ''viewDownloadHistoryPage()'' | Render download history page | 307 | |
| | protected | ''setView()'' | Set view for rendering | 324 | | | protected | ''setView()'' | Set view for rendering | 324 | |
| | protected | ''insert()'' | Insert - not implemented for downloads | 332 | | | protected | ''insert()'' | Insert - not implemented for downloads | 332 | |
| | protected | ''update()'' | Update - not implemented for downloads | 342 | | | protected | ''update()'' | Update - not implemented for downloads | 342 | |
| | protected | ''remove()'' | Remove - not implemented for downloads | 352 | | | protected | ''remove()'' | Remove - not implemented for downloads | 352 | |
| |
| |
| //lines 30–33 (4)// | //lines 30–33 (4)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$downloadService'' | [[scriptlog:lib:service:downloadservice|''DownloadService'']] | //required// | //none// | | | ''$downloadService'' | [[scriptlog:lib:service:downloadservice|''DownloadService'']] | //required// | //none// | |
| |
| |
| View download history | View download history |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$mediaId'' | ''(untyped)'' | //required// | //none// | | | ''$mediaId'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Get download history for AJAX | Get download history for AJAX |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$mediaId'' | ''(untyped)'' | //required// | //none// | | | ''$mediaId'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |
| Expire a single download | Expire a single download |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$identifier'' | ''(untyped)'' | //required// | //none// | | | ''$identifier'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — bool | **Returns:** ''(none declared)'' — bool |
| Regenerate a single download | Regenerate a single download |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$identifier'' | ''(untyped)'' | //required// | //none// | | | ''$identifier'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — string|false | **Returns:** ''(none declared)'' — string|false |
| Delete a single download | Delete a single download |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$identifier'' | ''(untyped)'' | //required// | //none// | | | ''$identifier'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — bool | **Returns:** ''(none declared)'' — bool |
| Create a new download link for a media file | Create a new download link for a media file |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$mediaId'' | ''(untyped)'' | //required// | //none// | | | ''$mediaId'' | ''(untyped)'' | //required// | //none// | |
| | ''$ipAddress'' | ''(untyped)'' | '''''' | //none// | | | ''$ipAddress'' | ''(untyped)'' | '''''' | //none// | |
| |
| **Returns:** ''(none declared)'' — string|false New identifier or false | **Returns:** ''(none declared)'' — string|false New identifier or false |
| Bulk create download links for media IDs | Bulk create download links for media IDs |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$mediaIds'' | ''(untyped)'' | //required// | //none// | | | ''$mediaIds'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — bool | **Returns:** ''(none declared)'' — bool |
| Get recent downloads | Get recent downloads |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$limit'' | ''(untyped)'' | ''10'' | //none// | | | ''$limit'' | ''(untyped)'' | ''10'' | //none// | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |
| Get download history | Get download history |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$limit'' | ''(untyped)'' | ''50'' | //none// | | | ''$limit'' | ''(untyped)'' | ''50'' | //none// | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |
| Render download history page | Render download history page |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$mediaId'' | ''(untyped)'' | //required// | //none// | | | ''$mediaId'' | ''(untyped)'' | //required// | //none// | |
| | ''$mediaFilename'' | ''(untyped)'' | //required// | //none// | | | ''$mediaFilename'' | ''(untyped)'' | //required// | //none// | |
| | ''$history'' | ''(untyped)'' | //required// | //none// | | | ''$history'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — void | **Returns:** ''(none declared)'' — void |
| Set view for rendering | Set view for rendering |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$viewName'' | ''(untyped)'' | //required// | //none// | | | ''$viewName'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Update - not implemented for downloads | Update - not implemented for downloads |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$id'' | ''(untyped)'' | //required// | //none// | | | ''$id'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Remove - not implemented for downloads | Remove - not implemented for downloads |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$id'' | ''(untyped)'' | //required// | //none// | | | ''$id'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| ======= Imports ======= | ======= Imports ======= |
| |
| ^ Alias ^ Fully-qualified name ^ | ^ Alias ^ Fully-qualified name ^ |
| | ''BaseApp'' | [[scriptlog:lib:core:baseapp|''Scriptlog\Core\BaseApp'']] | | | ''BaseApp'' | [[scriptlog:lib:core:baseapp|''Scriptlog\Core\BaseApp'']] | |
| | ''View'' | [[scriptlog:lib:core:view|''Scriptlog\Core\View'']] | | | ''View'' | [[scriptlog:lib:core:view|''Scriptlog\Core\View'']] | |
| | ''DownloadService'' | [[scriptlog:lib:service:downloadservice|''Scriptlog\Service\DownloadService'']] | | | ''DownloadService'' | [[scriptlog:lib:service:downloadservice|''Scriptlog\Service\DownloadService'']] | |
| |
| |