Class Ansel_GalleryMode_Date

Description

Ansel_GalleryMode_Date:: Class for encapsulating gallery methods that depend on the current display mode of the gallery being Date.

Located in /lib/GalleryMode/Date.php (line 20)


	
			
Variable Summary
Method Summary
 Ansel_Gallery_ModeDate Ansel_GalleryMode_Date ( &$gallery, Ansel_Gallery $gallery)
 integer countGalleryChildren ([integer $perm = PERMS_SHOW], [boolean $galleries_only = false], [boolean $noauto = true])
 integer countImages ([boolean $subgalleries = false])
 array getDate ()
 A getGalleryChildren ([integer $perm = PERMS_SHOW], [integer $from = 0], [integer $to = 0], [ $noauto = false])
 void getImages ([integer $from = 0], [integer $count = 0], mixed 2)
 void hasFeature ( $feature)
 void hasSubGalleries ()
 void init ()
 mixed listImages ([integer $from = 0], [integer $count = 0])
 mixed moveImagesTo (array $images, Ansel_Gallery $gallery)
 mixed removeImage (mixed $image, boolean $isStack)
 void setDate ([array $date = array()])
 unknown _getArraySlice (unknown_type $array, unknown_type $from, unknown_type $count, [ $preserve = false])
Variables
array $_date = array() (line 32)

The date part array for the current grouping.

mixed $_features = array('slideshow', 'zipdownload', 'upload') (line 34)
Ansel_Gallery $_gallery (line 25)
mixed $_subGalleries = null (line 36)
Methods
Constructor Ansel_GalleryMode_Date (line 45)

Constructor

Ansel_Gallery_ModeDate Ansel_GalleryMode_Date ( &$gallery, Ansel_Gallery $gallery)
countGalleryChildren (line 376)

Return the count of this gallery's children

  • return: 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).
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.
countImages (line 650)

Returns the number of images in this gallery and, optionally, all sub-galleries.

  • return: number of images in this gallery
integer countImages ([boolean $subgalleries = false])
  • boolean $subgalleries: Determines whether subgalleries should be counted or not.
getDate (line 146)

Getter for _date

  • return: A date parts array.
array getDate ()
getGalleryChildren (line 182)

Get the children of this gallery.

  • return: mixed array of Ansel_Gallery_Date and Ansel_Image objects.
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
getGalleryCrumbData (line 77)

Get an array describing where this gallery is in a breadcrumb trail.

  • return: array of 'title' and 'navdata' hashes with the [0] element being the deepest part.
An getGalleryCrumbData ()
getImages (line 616)

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
hasFeature (line 55)
void hasFeature ( $feature)
  • $feature
hasSubGalleries (line 636)

Checks if the gallery has any subgalleries. This will always be false for a gallery in date view.

void hasSubGalleries ()
init (line 50)
void init ()
listImages (line 397)

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.

  • return: An array of image_ids | PEAR_Error
mixed listImages ([integer $from = 0], [integer $count = 0])
  • integer $from: The image to start listing.
  • integer $count: The numer of images to list.
moveImagesTo (line 428)

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.

  • return: boolean || PEAR_Error
mixed moveImagesTo (array $images, Ansel_Gallery $gallery)
  • array $images: An array of image_ids to move.
  • Ansel_Gallery $gallery: The Ansel_Gallery to move them to.
removeImage (line 496)

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...

  • return: boolean || PEAR_Error
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).
setDate (line 156)

Setter for _date

void setDate ([array $date = array()])
  • array $date
_getArraySlice (line 583)

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
_getSubGalleries (line 161)
void _getSubGalleries ()

Documentation generated on Sun, 30 Jan 2011 05:08:44 +0000 by phpDocumentor 1.4.3