Class Ansel_Gallery_Decorator_Date
A decorator around an Ansel_Gallery to allow multiple date groupings
to access the same Ansel_Gallery instance.
Copyright 2008-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (GPL). If you
did not receive this file, see http://www.horde.org/licenses/gpl.
Methods summary
public
|
#
__construct( Ansel_Gallery $gallery, array $images = array() )
The Ansel_Gallery_Date constructor.
The Ansel_Gallery_Date constructor.
The client code (Ansel_GalleryMode_Date) needs to call the setDate()
method on the new GalleryMode_Date object before it's used.
Parameters
- $gallery
- The gallery we are decorating.
- $images
- <p>An array of image ids that this grouping
contains.</p>
|
public
mixed
|
#
__call( string $method, array $args )
Magic method - pass thru methods to the wrapped Ansel_Gallery:: or to
the Ansel_GalleryMode_Base:: handler.
Magic method - pass thru methods to the wrapped Ansel_Gallery:: or to
the Ansel_GalleryMode_Base:: handler.
Parameters
Returns
mixed
|
public
|
|
public
|
#
getTile( Ansel_Gallery $parent = null, Ansel_Style $style = null, boolean $mini = false, array $params = array() )
Output the HTML for this gallery's tile.
Output the HTML for this gallery's tile.
Parameters
- $parent
- The parent Ansel_Gallery object
- $style
- A gallery style to use.
- $mini
- Force the use of a mini thumbnail?
- $params
- <p>Any additional parameters the Ansel_Tile
object may need.</p>
|
public
array
|
#
getRecentImages( integer $limit = 10 )
Return the most recently added images in this gallery.
Return the most recently added images in this gallery.
Parameters
- $limit
- The maximum number of images to return.
Returns
array An array of Ansel_Image objects
|
public
Ansel_Image
|
#
getImage( integer $id )
Returns the image in this gallery corresponding to the given id.
Returns the image in this gallery corresponding to the given id.
Parameters
- $id
- The ID of the image to retrieve.
Returns
Ansel_Image
The image object corresponding to the given id.
|
public
integer
|
#
countImages( boolean $subgalleries = false )
Returns the number of images in this gallery and, optionally, all
sub-galleries.
Returns the number of images in this gallery and, optionally, all
sub-galleries.
Parameters
- $subgalleries
- <p>Determines whether subgalleries should
be counted or not.</p>
Returns
integer number of images in this gallery
|
public
mixed
|
#
getKeyImage( Ansel_Style $style = null )
Returns the key image for this gallery.
Returns the key image for this gallery.
Parameters
- $style
- Force the use of this style, if it's available
Returns
mixed The image_id of the key image or false.
|
public
integer
|
#
countChildren( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true )
Return a count of the number of children this share has
Return a count of the number of children this share has
Parameters
- $user
- The user to use for checking perms
- $perm
- A Horde_Perms::* constant
- $allLevels
- Count grandchildren or just children
Returns
integer The number of child shares
|
public
Ansel_Gallery
|
#
getParent( )
Returns a child's direct parent
Returns a child's direct parent
Returns
|
public
|
#
getImagesByGrouping( )
Returns all image ids that this grouping contains.
Returns all image ids that this grouping contains.
Array
|