GalleryManager
extends GalleryLibrary
in package
Gallery
Class to manage the gallery of the CMS
Tags
Table of Contents
Properties
- $_objTpl : mixed
- $arrSettings : mixed
- $importFiles : mixed
- $intLangId : mixed
- $intMaxEntries : mixed
- $strErrMessage : mixed
- $strImagePath : mixed
- $strImageWebPath : mixed
- $strImportPath : mixed
- $strOkMessage : mixed
- $strPageTitle : mixed
- $strThumbnailPath : mixed
- $strThumbnailWebPath : mixed
- $allowedImageExtensions : array<string|int, mixed>
- $allowedImageLabels : array<string|int, mixed>
- $allowedImageTypes : array<string|int, mixed>
- $sql : mixed
- $act : mixed
Methods
- __construct() : mixed
- Constructor -> Create the menu and copy the template
- _getSize() : int
- Get filesize
- _getType() : string
- Get filetype
- activateCategory() : mixed
- Activates or inactivates a category
- activatePicture() : mixed
- Activate / Inactivate a picture
- changeCategoryOfPicture() : mixed
- Changes the Category of an Image
- checkImages() : mixed
- Checks if the file is still there, removes dead links
- createImages_JPG_GIF_PNG() : mixed
- Create an Image
- deleteCategory() : mixed
- Delete a Category
- deleteComment() : mixed
- Delete a comment of a picture
- deleteImage() : mixed
- Deletes an Image from the database
- deleteImportPicture() : mixed
- Delete selected pictures
- deleteVote() : mixed
- Delete a voting of a picture
- editCategory() : mixed
- Shows the "Edit-Category"-Form
- fileExists() : mixed
- getCategoryNameByLang() : bool|array<string|int, mixed>
- Get the Category Name by Language
- getPage() : mixed
- Determine the page to display and call the appropriate methods
- getSettings() : mixed
- Gets the gallery settings
- importFromFolder() : mixed
- Import selected pictures from folder
- importPicture() : mixed
- import Pictures (requires chmod 777 in folder gallery_import)
- insertCategory() : mixed
- Inserts a new category into the database
- insertImage() : mixed
- Insert image into the database
- movePicture() : mixed
- Move pictures from gallery_import to gallery
- newCategory() : mixed
- Shows the 'Insert new category'-Form
- overview() : mixed
- Shows the overview of the gallery
- reloadAllValidate() : mixed
- Reload the validation page / Validated a picture / delete a picture
- reloadSingleValidate() : mixed
- Reload the validation page / Validated a picture / delete a picture
- resetPicture() : mixed
- Reset the picture and move it back to the validation part
- rotatePicture() : mixed
- Rotates an image clockwise by 90�
- saveCategorySorting() : mixed
- Saves the category sorting
- saveImagesSorting() : mixed
- Saves the image sorting
- saveSettings() : mixed
- Save the settings for the gallery
- setCategoryImage() : mixed
- Define an images as "category-image". This image will be shown in the category-selection.
- showCategoryDetails() : mixed
- Shows the category-details-page
- showEditComment() : mixed
- Edit a comment of a picture
- showEditPicture() : mixed
- Shows the edit-form for a picture
- showSettings() : mixed
- Shows the settings-page
- showSubCategories() : bool
- Show the Sub Categories
- showUploadForm() : mixed
- Shows the UploadForm
- showValidateForm() : mixed
- Shows the validation-page
- updateCategory() : mixed
- Updates an category in the database
- updateComment() : mixed
- Save all changes done to a comment
- updatePicture() : mixed
- Updates the name of a picture
- uploadFinished() : mixed
- Upload the submitted images
- checkAccess() : int
- Check access
- checkCategoryAccess() : bool
- Check the access to the category with the given ID
- getGroupLists() : array<string|int, mixed>
- Returns an array of strings containing dropdown menu options with existing (but not assigned) and assigned access groups for the category with the given ID.
- parseCategoryDropdown() : mixed
- Parse a category dropdown recursively. If you want nothing selected, you should pass -1 for the selected value.
- setNavigation() : mixed
- updateAccessId() : mixed
- Save the last access id
Properties
$_objTpl
public
mixed
$_objTpl
$arrSettings
public
mixed
$arrSettings
= array()
$importFiles
public
mixed
$importFiles
$intLangId
public
mixed
$intLangId
$intMaxEntries
public
mixed
$intMaxEntries
= 50
$strErrMessage
public
mixed
$strErrMessage
= ''
$strImagePath
public
mixed
$strImagePath
$strImageWebPath
public
mixed
$strImageWebPath
$strImportPath
public
mixed
$strImportPath
$strOkMessage
public
mixed
$strOkMessage
= ''
$strPageTitle
public
mixed
$strPageTitle
$strThumbnailPath
public
mixed
$strThumbnailPath
$strThumbnailWebPath
public
mixed
$strThumbnailWebPath
$allowedImageExtensions
protected
static array<string|int, mixed>
$allowedImageExtensions
= array('gif', 'jpg', 'jpeg', 'png', 'webp')
List of file endings to allow
$allowedImageLabels
protected
array<string|int, mixed>
$allowedImageLabels
= array('GIF', 'JPG', 'PNG', 'WEBP')
List of filetypes to show to the user
$allowedImageTypes
protected
array<string|int, mixed>
$allowedImageTypes
= array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_WEBP)
List of IMAGETYPE_... constants
$sql
protected
mixed
$sql
$act
private
mixed
$act
= ''
Methods
__construct()
Constructor -> Create the menu and copy the template
public
__construct() : mixed
Tags
_getSize()
Get filesize
public
_getSize(string $strFile) : int
Parameters
- $strFile : string
Return values
int —$intSize: Size of the file
_getType()
Get filetype
public
_getType(string $strFile) : string
Parameters
- $strFile : string
Return values
string —$strType: Type of the file
activateCategory()
Activates or inactivates a category
public
activateCategory(int $intCategoryId[, mixed $act = NULL ]) : mixed
Parameters
- $intCategoryId : int
- $act : mixed = NULL
Tags
activatePicture()
Activate / Inactivate a picture
public
activatePicture(int $intImageId[, mixed $act = NULL ]) : mixed
Parameters
- $intImageId : int
- $act : mixed = NULL
Tags
changeCategoryOfPicture()
Changes the Category of an Image
public
changeCategoryOfPicture(int $intImageId, int $intNewCatId) : mixed
Parameters
- $intImageId : int
- $intNewCatId : int
Tags
checkImages()
Checks if the file is still there, removes dead links
public
checkImages() : mixed
Tags
createImages_JPG_GIF_PNG()
Create an Image
public
createImages_JPG_GIF_PNG(mixed $strPathOld, mixed $strPathNew, mixed $strFileOld, mixed $strFileNew, mixed $intNewWidth, mixed $intNewHeight, mixed $intQuality) : mixed
Parameters
- $strPathOld : mixed
- $strPathNew : mixed
- $strFileOld : mixed
- $strFileNew : mixed
- $intNewWidth : mixed
- $intNewHeight : mixed
- $intQuality : mixed
deleteCategory()
Delete a Category
public
deleteCategory(int $intCategoryId) : mixed
Parameters
- $intCategoryId : int
Tags
deleteComment()
Delete a comment of a picture
public
deleteComment(mixed $intComId) : mixed
Parameters
- $intComId : mixed
Tags
deleteImage()
Deletes an Image from the database
public
deleteImage(mixed $intImageId) : mixed
Parameters
- $intImageId : mixed
Tags
deleteImportPicture()
Delete selected pictures
public
deleteImportPicture() : mixed
deleteVote()
Delete a voting of a picture
public
deleteVote(mixed $intVoteId) : mixed
Parameters
- $intVoteId : mixed
Tags
editCategory()
Shows the "Edit-Category"-Form
public
editCategory(int $intCategoryId) : mixed
Parameters
- $intCategoryId : int
Tags
fileExists()
public
static fileExists(mixed $fileName[, mixed $caseSensitive = true ]) : mixed
Parameters
- $fileName : mixed
- $caseSensitive : mixed = true
getCategoryNameByLang()
Get the Category Name by Language
public
getCategoryNameByLang() : bool|array<string|int, mixed>
Tags
Return values
bool|array<string|int, mixed>getPage()
Determine the page to display and call the appropriate methods
public
getPage() : mixed
Tags
getSettings()
Gets the gallery settings
public
getSettings() : mixed
Tags
importFromFolder()
Import selected pictures from folder
public
importFromFolder() : mixed
importPicture()
import Pictures (requires chmod 777 in folder gallery_import)
public
importPicture() : mixed
Tags
insertCategory()
Inserts a new category into the database
public
insertCategory() : mixed
Tags
insertImage()
Insert image into the database
public
static insertImage(mixed $objGallery, string $strImagePath, int $imageName) : mixed
Parameters
- $objGallery : mixed
- $strImagePath : string
- $imageName : int
Tags
movePicture()
Move pictures from gallery_import to gallery
public
movePicture(string $strFile) : mixed
Parameters
- $strFile : string
newCategory()
Shows the 'Insert new category'-Form
public
newCategory() : mixed
Tags
overview()
Shows the overview of the gallery
public
overview() : mixed
Tags
reloadAllValidate()
Reload the validation page / Validated a picture / delete a picture
public
reloadAllValidate() : mixed
Tags
reloadSingleValidate()
Reload the validation page / Validated a picture / delete a picture
public
reloadSingleValidate() : mixed
Tags
resetPicture()
Reset the picture and move it back to the validation part
public
resetPicture(int $intImageId) : mixed
Parameters
- $intImageId : int
Tags
rotatePicture()
Rotates an image clockwise by 90�
public
rotatePicture(mixed $intImageId) : mixed
Parameters
- $intImageId : mixed
Tags
saveCategorySorting()
Saves the category sorting
public
saveCategorySorting() : mixed
Tags
saveImagesSorting()
Saves the image sorting
public
saveImagesSorting() : mixed
Tags
saveSettings()
Save the settings for the gallery
public
saveSettings() : mixed
Tags
setCategoryImage()
Define an images as "category-image". This image will be shown in the category-selection.
public
setCategoryImage(int $intImgId) : mixed
Parameters
- $intImgId : int
Tags
showCategoryDetails()
Shows the category-details-page
public
showCategoryDetails(mixed $intCatId) : mixed
Parameters
- $intCatId : mixed
Tags
showEditComment()
Edit a comment of a picture
public
showEditComment(mixed $intCommentId) : mixed
Parameters
- $intCommentId : mixed
Tags
showEditPicture()
Shows the edit-form for a picture
public
showEditPicture() : mixed
Tags
showSettings()
Shows the settings-page
public
showSettings() : mixed
Tags
showSubCategories()
Show the Sub Categories
public
showSubCategories(int $parentId, array<string|int, mixed> $arrCategoryName, array<string|int, mixed> $arrImageCount, array<string|int, mixed> $arrImageSize, string $subCategorySpace) : bool
Parameters
- $parentId : int
- $arrCategoryName : array<string|int, mixed>
- $arrImageCount : array<string|int, mixed>
- $arrImageSize : array<string|int, mixed>
- $subCategorySpace : string
Tags
Return values
boolshowUploadForm()
Shows the UploadForm
public
showUploadForm() : mixed
Tags
showValidateForm()
Shows the validation-page
public
showValidateForm() : mixed
Tags
updateCategory()
Updates an category in the database
public
updateCategory(mixed $categoryId) : mixed
Parameters
- $categoryId : mixed
Tags
updateComment()
Save all changes done to a comment
public
updateComment() : mixed
Tags
updatePicture()
Updates the name of a picture
public
updatePicture() : mixed
Tags
uploadFinished()
Upload the submitted images
public
static uploadFinished(string $tempPath, mixed $tempWebPath, array<string|int, mixed> $paths, int $uploadId, mixed $fileInfos, mixed $response) : mixed
Parameters
- $tempPath : string
- $tempWebPath : mixed
- $paths : array<string|int, mixed>
- $uploadId : int
- $fileInfos : mixed
- $response : mixed
Tags
checkAccess()
Check access
private
checkAccess(int $access_id) : int
Parameters
- $access_id : int
Return values
intcheckCategoryAccess()
Check the access to the category with the given ID
private
checkCategoryAccess(int $id) : bool
Parameters
- $id : int
Return values
boolgetGroupLists()
Returns an array of strings containing dropdown menu options with existing (but not assigned) and assigned access groups for the category with the given ID.
private
getGroupLists(int $id[, string $type = "frontend" ]) : array<string|int, mixed>
Parameters
- $id : int
- $type : string = "frontend"
Return values
array<string|int, mixed>parseCategoryDropdown()
Parse a category dropdown recursively. If you want nothing selected, you should pass -1 for the selected value.
private
parseCategoryDropdown([int $selected = -1 ][, int $disabled = false ][, mixed $name = "showCategories" ][, mixed $parent_id = 0 ][, mixed $level = 0 ][, mixed $parseSubCategories = true ]) : mixed
Parameters
- $selected : int = -1
- $disabled : int = false
- $name : mixed = "showCategories"
- $parent_id : mixed = 0
- $level : mixed = 0
- $parseSubCategories : mixed = true
setNavigation()
private
setNavigation() : mixed
updateAccessId()
Save the last access id
private
updateAccessId(intval $id) : mixed
Parameters
- $id : intval