PHP Класс Ansel_GalleryMode_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.
Автор: Michael J. Rubinsky ([email protected])
Наследование: extends Ansel_GalleryMode_Base
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_date array The date part array for the current grouping.
$_features array Supported features
$_subGalleries array The subgalleries whose images need to be included in this date grouping.

Открытые методы

Метод Описание
countGalleryChildren ( integer $perm = Horde_Perms::SHOW, boolean $galleries_only = false, boolean $noauto = true ) : integer Return the count of this gallery's children
countImages ( boolean $subgalleries = false ) : integer Returns the number of images in this gallery and, optionally, all sub-galleries.
getDate ( ) : array Getter for date
getGalleryChildren ( integer $perm = Horde_Perms::SHOW, integer $from, integer $to, boolean $noauto = false ) : array Get the children of this gallery.
getGalleryCrumbData ( ) : array Get an array describing where this gallery is in a breadcrumb trail.
getImages ( integer $from, integer $count ) Gets a slice of the images in this gallery.
hasFeature ( string $feature ) : boolean See if a feature is supported.
hasSubGalleries ( ) : boolean Checks if the gallery has any subgalleries. This will always be false for a gallery in date view.
listImages ( integer $from, integer $count ) : array Lists a slice of the image ids in this gallery.
moveImagesTo ( array $images, Ansel_Gallery $gallery ) : boolean Moves images from one gallery to another. Since we're viewing by date some images might belong to a subgallery so we need to take care to udate the appropriate gallery data.
removeImage ( mixed $image, boolean $isStack ) : boolean Remove an image from this gallery. Note that the image might actually belong to a subgallery of this gallery since we are viewing by date.
setDate ( array $date = [] ) Setter for date

Защищенные методы

Метод Описание
_getArraySlice ( unknown_type $array, unknown_type $from, unknown_type $count, $preserve = false ) : unknown Helper function to get an array slice while preserving keys.
_loadSubGalleries ( ) Get this gallery's subgalleries. Populates the private member _subGalleries

Описание методов

_getArraySlice() защищенный Метод

Helper function to get an array slice while preserving keys.
protected _getArraySlice ( unknown_type $array, unknown_type $from, unknown_type $count, $preserve = false ) : unknown
$array unknown_type
$from unknown_type
$count unknown_type
Результат unknown

_loadSubGalleries() защищенный Метод

Get this gallery's subgalleries. Populates the private member _subGalleries
protected _loadSubGalleries ( )

countGalleryChildren() публичный Метод

Return the count of this gallery's children
public countGalleryChildren ( integer $perm = Horde_Perms::SHOW, boolean $galleries_only = false, boolean $noauto = true ) : integer
$perm integer The permissions to require.
$galleries_only boolean Only include galleries, no images. (Ignored since this makes no sense for a gallery grouped by dates).
$noauto boolean Auto navigate down to the first populated date grouping.
Результат integer The count of this gallery's children. The count is either a count of of the number of date groupings (months, days, etc..) that need to be displayed, or a count of all the images in the current date grouping (for a specific day).

countImages() публичный Метод

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.
Результат integer number of images in this gallery

getDate() публичный Метод

Getter for date
public getDate ( ) : array
Результат array A date parts array.

getGalleryChildren() публичный Метод

Get the children of this gallery.
public getGalleryChildren ( integer $perm = Horde_Perms::SHOW, integer $from, integer $to, boolean $noauto = false ) : array
$perm integer The permissions to limit to.
$from integer The child to start at.
$to integer The child to end with.
$noauto boolean Whether or not to automatically drill down to the first grouping with more then one group.
Результат array A mixed array of Ansel_Gallery_Decorator_Date and Ansel_Image objects.

getGalleryCrumbData() публичный Метод

Get an array describing where this gallery is in a breadcrumb trail.
public getGalleryCrumbData ( ) : array
Результат array An array of 'title' and 'navdata' hashes with the [0] element being the deepest part.

getImages() публичный Метод

Gets a slice of the images in this gallery.
public getImages ( integer $from, integer $count )
$from integer The image to start fetching.
$count integer The numer of images to return.

hasFeature() публичный Метод

See if a feature is supported.
public hasFeature ( string $feature ) : boolean
$feature string The feature
Результат boolean

hasSubGalleries() публичный Метод

Checks if the gallery has any subgalleries. This will always be false for a gallery in date view.
public hasSubGalleries ( ) : boolean
Результат boolean

listImages() публичный Метод

In Date mode, this only makes sense if we are currently viewing a specific day, otherwise we return 0.
public listImages ( integer $from, integer $count ) : array
$from integer The image to start listing.
$count integer The numer of images to list.
Результат array An array of image_ids

moveImagesTo() публичный Метод

Moves images from one gallery to another. Since we're viewing by date some images might belong to a subgallery so we need to take care to udate the appropriate gallery data.
public moveImagesTo ( array $images, Ansel_Gallery $gallery ) : boolean
$images array An array of image_ids to move.
$gallery Ansel_Gallery The Ansel_Gallery to move them to.
Результат boolean

removeImage() публичный Метод

Need to take care of updating correct subgallery's image count etc...
public removeImage ( mixed $image, boolean $isStack ) : boolean
$image mixed An image_id or Ansel_Image object to delete.
$isStack boolean Image is a stack image (doesn't update count).
Результат boolean

setDate() публичный Метод

Setter for date
public setDate ( array $date = [] )
$date array

Описание свойств

$_date защищенное свойство

The date part array for the current grouping.
protected array $_date
Результат array

$_features защищенное свойство

Supported features
protected array $_features
Результат array

$_subGalleries защищенное свойство

The subgalleries whose images need to be included in this date grouping.
protected array $_subGalleries
Результат array