ePages 6.17.52 - DE_EPAGES/MediaGallery/API/MediaGallery.pm

Package DE_EPAGES::MediaGallery::API::MediaGallery

Provides functions to get directory content of a filepath or a style/imagedb group objectpath.

@EXPORT_OK
GetDirectoryContent
GetGroupContent
InitImageDBGroups
InitStyleGroups

Functions

GetDirectoryContent
GetGroupContent
InitImageDBGroups
InitStyleGroups

GetDirectoryContent

Returns the content of a directory in the MediaGallery.

Syntax
GetDirectoryContent( $Site, $Directory );
Input
$Site (object)
site object
$Directory (string)
directory path
$aAllowedFormats (array.ref)
list of allowed file formats
Return
$hResult (hash.ref)
hash with directory, file infos

GetGroupContent

Returns content of an image group (style- or imagedbgroup).

Syntax
GetGroupContent( $ObjectPath, $Type );
Example
GetGroupContent( '/StyleGroups/Branches/StyleGroups/ArtAndEducation', 'Header' );
Input
$ObjectPath (string)
objectpath to style- or imagedbgroup
$Type (string)
imagetype (Header, Background, ImageDB)
$aAllowedFormats (array.ref)
list of allowed file formats
Return
$hResult (hash.ref)
hash with group infos (subgroups, files, ...)

InitImageDBGroups

Returns the 'root' content of ImageDBGroups to init the MediaGallery.

Syntax
InitImageDBGroups();
Return
$hResult (hash.ref)
jstree compatible data structure with ImageDBGroups information

InitStyleGroups

Returns the 'root' content of the StyleGroups to init the MediaGallery.

Syntax
InitStyleGroups( $Type );
Example
InitStyleGroups( 'Header' );
Input
$Type (string)
'Header', 'Background' - ImageTypes of a StyleGroup
Return
$hResult (hash.ref)
jstree compatible data structure with StyleGroups information