PHP Class Ansel_Gallery_Decorator_Date, horde

Copyright 2008-2016 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.
Author: Michael J. Rubinsky ([email protected])
Mostra file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_gallery Ansel_Gallery The gallery we are decorating
$_images array An array of image ids that this gallery contains
$_modeHelper The gallery mode helper

Public Methods

Method Description
__call ( string $method, array $args ) : mixed Magic method - pass thru methods to the wrapped Ansel_Gallery:: or to the Ansel_GalleryMode_Base:: handler.
__construct ( Ansel_Gallery $gallery, array $images = [] ) The Ansel_Gallery_Date constructor.
__get ( $property )
countChildren ( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true ) : integer Return a count of the number of children this share has
countImages ( boolean $subgalleries = false ) : integer Returns the number of images in this gallery and, optionally, all sub-galleries.
getImage ( integer $id ) : Ansel_Image Returns the image in this gallery corresponding to the given id.
getImagesByGrouping ( ) Returns all image ids that this grouping contains.
getKeyImage ( Ansel_Style $style = null ) : mixed Returns the key image for this gallery.
getParent ( ) : Ansel_Gallery Returns a child's direct parent
getRecentImages ( integer $limit = 10 ) : array Return the most recently added images in this gallery.
getTile ( Ansel_Gallery $parent = null, Ansel_Style $style = null, boolean $mini = false, array $params = [] ) Output the HTML for this gallery's tile.

Method Details

__call() public method

Magic method - pass thru methods to the wrapped Ansel_Gallery:: or to the Ansel_GalleryMode_Base:: handler.
public __call ( string $method, array $args ) : mixed
$method string
$args array
return mixed

__construct() public method

The client code (Ansel_GalleryMode_Date) needs to call the setDate() method on the new GalleryMode_Date object before it's used.
public __construct ( Ansel_Gallery $gallery, array $images = [] )
$gallery Ansel_Gallery The gallery we are decorating.
$images array An array of image ids that this grouping contains.

__get() public method

public __get ( $property )

countChildren() public method

Return a count of the number of children this share has
public countChildren ( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true ) : integer
$user string The user to use for checking perms
$perm integer A Horde_Perms::* constant
$allLevels boolean Count grandchildren or just children
return integer The number of child shares

countImages() public method

Returns the number of images in this gallery and, optionally, all sub-galleries.
public countImages ( boolean $subgalleries = false ) : integer
$subgalleries boolean Determines whether subgalleries should be counted or not.
return integer number of images in this gallery

getImage() public method

Returns the image in this gallery corresponding to the given id.
public getImage ( integer $id ) : Ansel_Image
$id integer The ID of the image to retrieve.
return Ansel_Image The image object corresponding to the given id.

getImagesByGrouping() public method

Returns all image ids that this grouping contains.
public getImagesByGrouping ( )

getKeyImage() public method

Returns the key image for this gallery.
public getKeyImage ( Ansel_Style $style = null ) : mixed
$style Ansel_Style Force the use of this style, if it's available
return mixed The image_id of the key image or false.

getParent() public method

Returns a child's direct parent
public getParent ( ) : Ansel_Gallery
return Ansel_Gallery The direct parent Horde_Share_Object

getRecentImages() public method

Return the most recently added images in this gallery.
public getRecentImages ( integer $limit = 10 ) : array
$limit integer The maximum number of images to return.
return array An array of Ansel_Image objects

getTile() public method

Output the HTML for this gallery's tile.
public getTile ( Ansel_Gallery $parent = null, Ansel_Style $style = null, boolean $mini = false, array $params = [] )
$parent Ansel_Gallery The parent Ansel_Gallery object
$style Ansel_Style A gallery style to use.
$mini boolean Force the use of a mini thumbnail?
$params array Any additional parameters the Ansel_Tile object may need.

Property Details

$_images protected_oe property

An array of image ids that this gallery contains
protected array $_images
return array

$_modeHelper protected_oe property

The gallery mode helper
protected $_modeHelper