The Ansel_Gallery_Date constructor.
Ansel_Gallery_Date
Ansel_Gallery_Date
(
&$gallery, [
array $images =
array()],
Ansel_Gallery $gallery)
-
Ansel_Gallery
$gallery: The gallery we are decorating.
-
array
$images: An array of image ids that this grouping contains.
-
&$gallery
Checks if the user can download the full photo
boolean
canDownload
()
Copy image and related data to specified gallery.
-
array
$images: An array of image ids.
-
Ansel_Gallery
$gallery: The gallery to copy images to.
Return a count of the number of children this share has
mixed
countChildren
([integer $perm = PERMS_SHOW], [boolean $allLevels = true])
-
integer
$perm: A PERMS_* constant
-
boolean
$allLevels: Count grandchildren or just children
Return the count this gallery's children
integer
countGalleryChildren
([integer $perm = PERMS_SHOW], [boolean $galleries_only = false], [ $noauto = true])
-
integer
$perm: The permissions to require.
-
boolean
$galleries_only: Only include galleries, no images.
-
$noauto
Returns the number of images in this gallery and, optionally, all sub-galleries.
integer
countImages
([boolean $subgalleries = false])
-
boolean
$subgalleries: Determines whether subgalleries should be counted or not.
Get all children of this share.
mixed
getChildren
([int $perm = PERMS_SHOW], [boolean $allLevels = true])
-
int
$perm: PERMS_* constant. If NULL will return all shares regardless of permissions.
-
boolean
$allLevels: Return all levels.
Returns the default image for this gallery.
mixed
getDefaultImage
([string $style = null])
-
string
$style: Force the use of this style, if it's available otherwise use whatever style is choosen for this gallery. If prettythumbs are not available then we always use ansel_default style.
Get the children of this gallery.
A
getGalleryChildren
([integer $perm = PERMS_SHOW], [integer $from = 0], [integer $to = 0], [ $noauto = false])
-
integer
$perm: The permissions to limit to.
-
integer
$from: The child to start at.
-
integer
$to: The child to end with.
-
$noauto
Returns the image in this gallery corresponding to the given id.
-
integer
$id: The ID of the image to retrieve.
Gets a slice of the images in this gallery.
void
getImages
([integer $from = 0], [integer $count = 0], mixed 2)
-
integer
$from: The image to start fetching.
-
integer
$count: The numer of images to return.
-
mixed
2: An array of Ansel_Image objects | PEAR_Error
Returns this share's owner's Identity object.
Identity
getOwner
()
Returns a child's direct parent
mixed
getParent
()
Get all of this share's parents.
array()
getParents
()
Return the most recently added images in this gallery.
mixed
getRecentImages
([integer $limit = 10])
-
integer
$limit: The maximum number of images to return.
Return the style definition for this gallery. Returns the first available style in this order: Explicitly configured style if available, if configured style is not available, use ansel_default. If nothing has been configured, the user's selected default is attempted.
array
getStyle
()
Returns this gallery's tags.
void
getTags
()
Output the HTML for this gallery's tile.
void
getTile
([
Ansel_Gallery $parent =
null], [
string $style =
null], [
boolean $mini =
false], [
array $params =
array()])
-
Ansel_Gallery
$parent: The parent Ansel_Gallery object
-
string
$style: A named gallery style to use.
-
boolean
$mini: Force the use of a mini thumbnail?
-
array
$params: Any additional parameters the Ansel_Tile object may need.
Checks to see if a user has a given permission.
boolean
hasPermission
(string $userid, integer $permission, [string $creator = null])
-
string
$userid: The userid of the user.
-
integer
$permission: A PERMS_* constant to test for.
-
string
$creator: The creator of the event.
Checks if the gallery has any subgallery
void
hasSubGalleries
()
Check user age limtation
boolean
isOldEnough
()
Lists a slice of the image ids in this gallery.
mixed
listImages
([integer $from = 0], [integer $count = 0])
-
integer
$from: The image to start listing.
-
integer
$count: The numer of images to list.
Remove the given image from this gallery.
boolean
removeImage
(mixed $image, [ $isStack = false])
-
mixed
$image: Image to delete. Can be an Ansel_Image or an image ID.
-
$isStack
Set the order of an image in this gallery.
void
setImageOrder
(integer $imageId, integer $pos)
-
integer
$imageId: The image to sort.
-
integer
$pos: The sort position of the image.
Set/replace this gallery's tags.
void
setTags
(array $tags)
-
array
$tags: AN array of tag names to associate with this image.
Return a hash key for the given view and style.
string
_getViewHash
(string $view, [string $style = null])
-
string
$view: The view (thumb, prettythumb etc...)
-
string
$style: The named style.
Sets a new GalleryMode helper for this decorated gallery. The client code (Ansel_GalleryMode_Date) needs to call the setDate() method on the new GalleryMode_Date object before it's used.
Ansel_Gallery_Mode
_setModeHelper
()