Constructor
Ansel_Gallery_ModeDate
Ansel_GalleryMode_Date
(
&$gallery,
Ansel_Gallery $gallery)
Return the count of this gallery's children
integer
countGalleryChildren
([integer $perm = PERMS_SHOW], [boolean $galleries_only = false], [boolean $noauto = true])
-
integer
$perm: The permissions to require.
-
boolean
$galleries_only: Only include galleries, no images. (Ignored since this makes no sense for a gallery grouped by dates).
-
boolean
$noauto: Auto navigate down to the first populated date grouping.
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.
Getter for _date
array
getDate
()
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
Get an array describing where this gallery is in a breadcrumb trail.
An
getGalleryCrumbData
()
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
void
hasFeature
( $feature)
Checks if the gallery has any subgalleries. This will always be false for a gallery in date view.
void
hasSubGalleries
()
Lists a slice of the image ids in this gallery.
In Date mode, this only makes sense if we are currently viewing a specific day, otherwise we return 0.
mixed
listImages
([integer $from = 0], [integer $count = 0])
-
integer
$from: The image to start listing.
-
integer
$count: The numer of images to list.
Moves images from one gallery to another. Since we're viewing by date some images might belong to a subgallery so we need to take care to udate the appropriate gallery data.
-
array
$images: An array of image_ids to move.
-
Ansel_Gallery
$gallery: The Ansel_Gallery to move them to.
Remove an image from this gallery. Note that the image might actually belong to a subgallery of this gallery since we are viewing by date.
Need to take care of updating correct subgallery's image count etc...
mixed
removeImage
(mixed $image, boolean $isStack)
-
mixed
$image: An image_id or Ansel_Image object to delete.
-
boolean
$isStack: Image is a stack image (doesn't update count).
Setter for _date
void
setDate
([array $date = array()])
Helper function to get an array slice while preserving keys.
unknown
_getArraySlice
(unknown_type $array, unknown_type $from, unknown_type $count, [ $preserve = false])
-
unknown_type
$array
-
unknown_type
$from
-
unknown_type
$count
-
$preserve