Class: GalleryChildEntityHelper_simple
Source Location: /modules/core/classes/helpers/GalleryChildEntityHelper_simple.class
Class GalleryChildEntityHelper_simple
Method Summary
array |
_getOrderInfo() |
If we want to sort, which storage info we need? |
Methods
void buildItemQuery(
$baseTable,
$baseIdColumn,
$baseQuery,
$orderBy,
$orderDirection,
$class,
$requiredPermission,
$linkableOnly,
$userId
)
|
|
Parameters:
|
$baseTable: |
|
|
$baseIdColumn: |
|
|
$baseQuery: |
|
|
$orderBy: |
|
|
$orderDirection: |
|
|
$class: |
|
|
$requiredPermission: |
|
|
$linkableOnly: |
|
|
$userId: |
|
API Tags:
See: | GalleryCoreApi::buildItemQuery |
void fetchChildAlbumItemIds(
$item, [
$offset = null], [
$count = null], [
$userId = null]
)
|
|
Parameters:
|
$item: |
|
|
$offset: |
|
|
$count: |
|
|
$userId: |
|
API Tags:
See: | GalleryCoreApi::fetchChildAlbumItemIds |
void fetchChildDataItemIds(
$item, [
$offset = null], [
$count = null], [
$userId = null]
)
|
|
Parameters:
|
$item: |
|
|
$offset: |
|
|
$count: |
|
|
$userId: |
|
API Tags:
See: | GalleryCoreApi::fetchChildDataItemIds |
void fetchChildItemIds(
$item, [
$offset = null], [
$count = null], [
$userId = null]
)
|
|
Parameters:
|
$item: |
|
|
$offset: |
|
|
$count: |
|
|
$userId: |
|
API Tags:
See: | GalleryCoreApi::fetchChildItemIds |
void fetchChildItemIdsIgnorePermissions(
$item, [
$offset = null], [
$count = null]
)
|
|
Parameters:
API Tags:
See: | GalleryCoreApi::fetchChildItemIdsIgnorePermissions |
void fetchChildItemIdsWithPermission(
$itemId,
$permissionId
)
|
|
Parameters:
API Tags:
See: | GalleryCoreApi::fetchChildItemIdsWithPermission |
void fetchDescendentAlbumItemIds(
$item,
$offset,
$count,
$requiredPermission
)
|
|
Parameters:
|
$item: |
|
|
$offset: |
|
|
$count: |
|
|
$requiredPermission: |
|
API Tags:
See: | GalleryCoreApi::fetchDescendentAlbumItemIds |
void fetchDescendentItemIds(
$item,
$offset,
$count,
$requiredPermission
)
|
|
Parameters:
|
$item: |
|
|
$offset: |
|
|
$count: |
|
|
$requiredPermission: |
|
API Tags:
See: | GalleryCoreApi::fetchDescendentItemIds |
void fetchLinkableChildItemIdsWithPermission(
$itemId,
$permissionId
)
|
|
Parameters:
API Tags:
See: | GalleryCoreApi::fetchLinkableChildItemIdsWithPermission |
void fetchParents(
$item, [
$permission = null], [
$filterBreadcrumb = false]
)
|
|
Parameters:
|
$item: |
|
|
$permission: |
|
|
$filterBreadcrumb: |
|
API Tags:
See: | GalleryCoreApi::fetchParents |
array _fetchChildItemIds(
GalleryItem
$item, int
$offset, int
$count, string
$class, string|array
$requiredPermission, boolean
$linkableOnly, int
$userId
)
|
|
Helper function for getting child ids
Parameters:
GalleryItem |
$item: |
|
int |
$offset: |
an offset into the child item list (null for no offset) |
int |
$count: |
a count of how many child items to return (null for unlimited) |
string |
$class: |
a class to restrict children to (eg. 'GalleryAlbumItem') |
string|array |
$requiredPermission: |
a single required permission-id (can be null) or an array or permission-ids |
boolean |
$linkableOnly: |
whether to restrict to linkable items only |
int |
$userId: |
the userid we're doing this for (defaults to active user id) |
API Tags:
Return: | GalleryStatus a status code array of item ids |
Access: | private |
array _fetchDescendentItemIds(
GalleryItem
$item, int
$offset, int
$count, string
$class, string
$requiredPermission
)
|
|
Helper function for getting descendent ids.
Parameters:
GalleryItem |
$item: |
|
int |
$offset: |
an offset into the child item list (null for no offset) |
int |
$count: |
a count of how many child items to return (null for unlimited) |
string |
$class: |
a class to restrict children to (eg. 'GalleryAlbumItem') |
string |
$requiredPermission: |
a required permission (defaults to 'core.view') |
API Tags:
Return: | GalleryStatus a status code array of ids |
Access: | private |
array _getOrderInfo(
string
$orderBy, string
$orderDirection
)
|
|
If we want to sort, which storage info we need?
This will return the ORDER BY clause to sort the items and a condition that we need to add to the fetching query. To join with a new table, the [GalleryChildEntity::id] will contain the current ID. Eventually another table mentioned in the condition will have to be included too, the calling function has to decide that (using GalleryStorage::extractClasses())
Parameters:
string |
$orderBy: |
orderBy (null/empty to use site default for both parameters) |
string |
$orderDirection: |
orderDirection |
API Tags:
Return: | GalleryStatus a status code string order by clause, string select clause, string a row matching condition, string optional join clause |
Access: | private |
|
|