PHP Class Ansel_View_GalleryRenderer_Base, 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])
显示文件 Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$children The Ansel_Image or Ansel_DateGallery objects that appear on the current page in the current view.
$date If we are grouping by date, this holds the currently selected date parts.
$galleryId integer The gallery id for this view's gallery (Convenience instead of $this->view->gallery->id)
$gallerySlug string Gallery slug for current gallery.
$mode integer 0 == Normal 1 == Group by date
$numTiles integer The total number of tiles that this view contains
$page integer The current page we are viewing
$pageend integer The last tile number on the current page.
$pagestart integer The tile number we are starting with on the current page.
$perpage integer Holds number of tiles to display per page
$style Ansel_Style The style definition.
$title string Human readable title for this view type
$view Ansel_View_Gallery The Ansel_View_Gallery object that this Renderer belongs to.

Public Methods

Method Description
__construct ( Ansel_View_Gallery $view = null ) Constructor
fetchChildren ( boolean $noauto ) Default implementation for fetching children/images for this view.
getChildImageIds ( ) : array Return the image ids contained in the gallery.
html ( ) : string Return the HTML for this view. Done this way so we can override this in subclasses if desired.
init ( ) Initialize the renderer. This *must* be called before any attempt is made to display or otherwise interact with the renderer.

Protected Methods

Method Description
_getHordeView ( ) : Horde_View Return an initialized Horde_View instance, populated with all the values common to all Gallery views.
_getPagerUrl ( ) : Horde_Url Return the current pagerurl.
_init ( ) Stub to be overridden by child classes if needed.
_setupPager ( Horde_View &$view ) Populate the Horde_View with the $pager object.

Method Details

__construct() public method

Constructor
public __construct ( Ansel_View_Gallery $view = null )
$view Ansel_View_Gallery

_getHordeView() protected method

Return an initialized Horde_View instance, populated with all the values common to all Gallery views.
protected _getHordeView ( ) : Horde_View
return Horde_View

_getPagerUrl() protected method

Return the current pagerurl.
protected _getPagerUrl ( ) : Horde_Url
return Horde_Url The url

_init() protected method

Stub to be overridden by child classes if needed.
protected _init ( )

_setupPager() protected method

Populate the Horde_View with the $pager object.
protected _setupPager ( Horde_View &$view )
$view Horde_View The Horde_View object.

fetchChildren() public method

Other view classes can override this if they need anything special.
public fetchChildren ( boolean $noauto )
$noauto boolean Flag to indicate if we shouldn't automatically drill down on views that support this. E.g., DateMode.

getChildImageIds() public method

Return the image ids contained in the gallery.
public getChildImageIds ( ) : array
return array An array of image ids.

html() abstract public method

Return the HTML for this view. Done this way so we can override this in subclasses if desired.
abstract public html ( ) : string
return string

init() public method

Initialize the renderer. This *must* be called before any attempt is made to display or otherwise interact with the renderer.
public init ( )

Property Details

$children public_oe property

The Ansel_Image or Ansel_DateGallery objects that appear on the current page in the current view.
public $children

$date public_oe property

If we are grouping by date, this holds the currently selected date parts.
public $date

$galleryId public_oe property

The gallery id for this view's gallery (Convenience instead of $this->view->gallery->id)
public int $galleryId
return integer

$gallerySlug public_oe property

Gallery slug for current gallery.
public string $gallerySlug
return string

$mode public_oe property

0 == Normal 1 == Group by date
public int $mode
return integer

$numTiles public_oe property

The total number of tiles that this view contains
public int $numTiles
return integer

$page public_oe property

The current page we are viewing
public int $page
return integer

$pageend public_oe property

The last tile number on the current page.
public int $pageend
return integer

$pagestart public_oe property

The tile number we are starting with on the current page.
public int $pagestart
return integer

$perpage public_oe property

Holds number of tiles to display per page
public int $perpage
return integer

$style public_oe property

The style definition.
public Ansel_Style $style
return Ansel_Style

$title public_oe property

Human readable title for this view type
public string $title
return string

$view public_oe property

The Ansel_View_Gallery object that this Renderer belongs to.
public Ansel_View_Gallery $view
return Ansel_View_Gallery