Cache viewable data for user
Parameters:
API Tags:
Information Tags:
| Todo: | Respect DisabledMap on INSERT such that we don't have to join the DisabledMap on SELECT |
array fetchViewableData(
string
$itemType, string
$order, int
$count, [int
$parentId = null], [int
$userId = null]
)
|
|
Fetch item data for use in image block
Parameters:
|
string |
$itemType: |
|
|
string |
$order: |
the order type (random, recent, viewed, daily, weekly, monthly) |
|
int |
$count: |
how many items to select |
|
int |
$parentId: |
limit item selection to descendents of this item (optional) |
|
int |
$userId: |
user id for permissions check (optional; defaults to current user) |
API Tags:
| Return: | GalleryStatus a status code array of arrays containing id, viewCount of items (empty array if none found) |
array getDisabledFlag(
int
$itemId
)
|
|
Get the disabled flag for an item
Parameters:
|
int |
$itemId: |
entityId of a GalleryItem for which the flag is to be retrieved |
API Tags:
| Return: | GalleryStatus a status code boolean disabledFlag for the GalleryDataItem |
int getRandomKey(
[
$min = 0], [
$max = 2147483647], int
$min(optional), int
$max(optional)
)
|
|
Get a random number that can be used to search later
Parameters:
|
int |
$min(optional): |
the minimum number to generate (default: 0) |
|
int |
$max(optional): |
the maximim number to generate (default: 2147483647) |
|
|
$min: |
|
|
|
$max: |
|
API Tags:
| Return: | a number between 0 and 2147483647. |
array getRandomKeyRange(
int
$userId, int
$itemType, [string
$parentSequence = null]
)
|
|
Determine the highest and lowest numbers currently in the random index.
Parameters:
|
int |
$userId: |
User id |
|
int |
$itemType: |
ImageBlock itemType |
|
string |
$parentSequence: |
(optional) Optional parent sequence condition |
API Tags:
| Return: | GalleryStatus a status code array int Minimum value of the random number to be genereated int Maximum value of the random number to be generated |
void handleEvent(
$event
)
|
|
Event handler for Gallery::ViewableTreeChange, GalleryEntity::save, and GalleryEntity::delete
Parameters:
API Tags:
| See: | GalleryEventListener::handleEvent |
Load image block data into template.
Parameters:
|
GalleryTemplate |
$template: |
|
|
array |
$params: |
(optional) image block parameters (to override module settings) |
|
|
&$template: |
|
API Tags:
Set the disabled flag for an album
Parameters:
|
GalleryAlbumItem |
$parentAlbum: |
AlbumItem which is to be flagged |
|
boolean |
$recursive: |
whether to set the disabledFlag recursively to all subalbums |
|
boolean |
$disabled: |
whether to set the disabledFlag to true or to false |
|
boolean |
$useProgressBar: |
(optional) use a progressbar during update? (default=false) |
API Tags:
array _buildOrderBy(
string
$order
)
|
|
Build the 'ORDER BY' section of the fetchViewableData query
Parameters:
|
string |
$order: |
the order type (random, recent, viewed) |
API Tags:
| Return: | GalleryStatus a status code string containing SQL ORDER BY statement |
void _getBlockData(
$itemType,
$order,
$count, [
$parentId = null], [
$fullSize = false], [
$userId = null], [
$maxSize = null], [
$biggerOnly = false]
)
|
|
Parameters:
|
|
$itemType: |
|
|
|
$order: |
|
|
|
$count: |
|
|
|
$parentId: |
|
|
|
$fullSize: |
|
|
|
$userId: |
|
|
|
$maxSize: |
|
|
|
$biggerOnly: |
|
API Tags:
void _isCached(
$userId
)
|
|
Parameters:
API Tags:
void _runQuery(
$query,
$data
)
|
|
Parameters:
API Tags: