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
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_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