\Ansel_GalleryMode_Normal

Ansel_Gallery_Mode_Normal:: Class for encapsulating gallery methods that depend on the current display mode of the gallery.

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()
hasFeature()
setDate()
getDate()
getGalleryChildren()
countGalleryChildren()
getGalleryCrumbData()
listImages()
getImages()
moveImagesTo()
removeImage()
hasSubGalleries()
countImages()
No public properties found
MODE_NORMAL
MODE_DATE
No protected methods found
$_gallery
$_features
N/A
No private methods found
No private properties found
N/A

Constants

MODE_NORMAL

MODE_NORMAL

MODE_DATE

MODE_DATE

Properties

$_features

$_features : array

The array of supported features

Type

array

Methods

hasFeature()

hasFeature(  $feature) 

Parameters

$feature

setDate()

setDate(array  $date = array()) 

Parameters

array $date

Date parts array

getDate()

getDate() : array

Returns

array —

Date parts array.

getGalleryChildren()

getGalleryChildren(integer  $perm = \Horde_Perms::SHOW, integer  $from,   $to) : array

Get the children of this gallery.

Parameters

integer $perm

The permissions to limit to.

integer $from

The child to start at.

$to

Returns

array —

A mixed array of Ansel_Gallery and Ansel_Image objects that are children of this gallery.

countGalleryChildren()

countGalleryChildren(integer  $perm = \Horde_Perms::SHOW, boolean  $galleries_only = false) : integer

Return the count this gallery's children

Parameters

integer $perm

The permissions to require.

boolean $galleries_only

Only include galleries, no images.

Returns

integer —

The count of this gallery's children.

getGalleryCrumbData()

getGalleryCrumbData() : \An

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

Returns

\An —

array of 'title' and 'navdata' hashes with the [0] element being the deepest part.

listImages()

listImages(integer  $from, integer  $count) : array

Lists a slice of the image ids in this gallery.

Parameters

integer $from

The image to start listing.

integer $count

The numer of images to list.

Returns

array —

An array of image_ids

getImages()

getImages(integer  $from, integer  $count) 

Gets a slice of the images in this gallery.

Parameters

integer $from

The image to start fetching.

integer $count

The numer of images to return.

moveImagesTo()

moveImagesTo(array  $images, \Ansel_Gallery  $gallery) : boolean

Move images from this gallery to another.

Parameters

array $images

The image ids to move.

\Ansel_Gallery $gallery

The gallery to move images into.

Throws

\Ansel_Exception
\Horde_Exception_PermissionDenied

Returns

boolean

removeImage()

removeImage(  $image, boolean  $isStack) : boolean

Remove an image from Ansel.

Parameters

$image
boolean $isStack

This represents a stack image

Throws

\Horde_Exception_NotFound

Returns

boolean

hasSubGalleries()

hasSubGalleries() : boolean

Checks if the gallery has any subgallery

Returns

boolean

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