MODE_NORMAL
MODE_NORMAL
Ansel_GalleryMode_Date:: Class for encapsulating gallery methods that depend on the current display mode of the gallery being Date.
Copyright 2008-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
$_gallery : \Ansel_Gallery
__construct(\Ansel_Gallery $gallery) : \Ansel_GalleryMode_Base
Constructor
\Ansel_Gallery | $gallery | The gallery to bind to. |
getGalleryChildren(integer $perm = \Horde_Perms::SHOW, integer $from, integer $to, boolean $noauto = false) : array
Get the children of this gallery.
integer | $perm | The permissions to limit to. |
integer | $from | The child to start at. |
integer | $to | The child to end with. |
boolean | $noauto | Whether or not to automatically drill down to the first grouping with more then one group. |
A mixed array of Ansel_Gallery_Decorator_Date and Ansel_Image objects.
countGalleryChildren(integer $perm = \Horde_Perms::SHOW, boolean $galleries_only = false, boolean $noauto = true) : integer
Return the count of this gallery's children
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. |
The count of this gallery's children. The count is either a count of of the number of date groupings (months, days, etc..) that need to be displayed, or a count of all the images in the current date grouping (for a specific day).
listImages(integer $from, integer $count) : array
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.
integer | $from | The image to start listing. |
integer | $count | The numer of images to list. |
An array of image_ids
moveImagesTo(array $images, \Ansel_Gallery $gallery) : boolean
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. |
removeImage(mixed $image, boolean $isStack) : boolean
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 | $image | An image_id or Ansel_Image object to delete. |
boolean | $isStack | Image is a stack image (doesn't update count). |
Ansel_Exception