\Ansel_Gallery_Decorator_Date

A decorator around an Ansel_Gallery to allow multiple date groupings to access the same Ansel_Gallery instance.

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.

Summary

Methods
Properties
Constants
__construct()
__call()
__get()
getTile()
getRecentImages()
getImage()
countImages()
getKeyImage()
countChildren()
getParent()
getImagesByGrouping()
No public properties found
No constants found
No protected methods found
$_modeHelper
$_gallery
$_images
N/A
No private methods found
No private properties found
N/A

Properties

$_modeHelper

$_modeHelper : \Ansel_GalleryMode_Base

The gallery mode helper

Type

\Ansel_GalleryMode_Base — object

$_gallery

$_gallery : \Ansel_Gallery

The gallery we are decorating

Type

\Ansel_Gallery

$_images

$_images : array

An array of image ids that this gallery contains

Type

array

Methods

__construct()

__construct(\Ansel_Gallery  $gallery, array  $images = array()) 

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

\Ansel_Gallery $gallery

The gallery we are decorating.

array $images

An array of image ids that this grouping contains.

__call()

__call(string  $method, array  $args) : mixed

Magic method - pass thru methods to the wrapped Ansel_Gallery:: or to the Ansel_GalleryMode_Base:: handler.

Parameters

string $method
array $args

Returns

mixed

__get()

__get(  $property) 

Parameters

$property

getTile()

getTile(\Ansel_Gallery  $parent = null, \Ansel_Style  $style = null, boolean  $mini = false, array  $params = array()) 

Output the HTML for this gallery's tile.

Parameters

\Ansel_Gallery $parent

The parent Ansel_Gallery object

\Ansel_Style $style

A gallery style to use.

boolean $mini

Force the use of a mini thumbnail?

array $params

Any additional parameters the Ansel_Tile object may need.

getRecentImages()

getRecentImages(integer  $limit = 10) : array

Return the most recently added images in this gallery.

Parameters

integer $limit

The maximum number of images to return.

Returns

array —

An array of Ansel_Image objects

getImage()

getImage(integer  $id) : \Ansel_Image

Returns the image in this gallery corresponding to the given id.

Parameters

integer $id

The ID of the image to retrieve.

Returns

\Ansel_Image

The image object corresponding to the given id.

countImages()

countImages(boolean  $subgalleries = false) : integer

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

Parameters

boolean $subgalleries

Determines whether subgalleries should be counted or not.

Returns

integer —

number of images in this gallery

getKeyImage()

getKeyImage(\Ansel_Style  $style = null) : mixed

Returns the key image for this gallery.

Parameters

\Ansel_Style $style

Force the use of this style, if it's available

Returns

mixed —

The image_id of the key image or false.

countChildren()

countChildren(string  $user, integer  $perm = \Horde_Perms::SHOW, boolean  $allLevels = true) : integer

Return a count of the number of children this share has

Parameters

string $user

The user to use for checking perms

integer $perm

A Horde_Perms::* constant

boolean $allLevels

Count grandchildren or just children

Returns

integer —

The number of child shares

getParent()

getParent() : \Ansel_Gallery

Returns a child's direct parent

Returns

\Ansel_Gallery

The direct parent Horde_Share_Object

getImagesByGrouping()

getImagesByGrouping() 

Returns all image ids that this grouping contains.