Album __construct(
object
&$gallery, string
$folder8, [bool
$cache = true], [
$quiet = false]
)
|
|
Constructor for albums
Parameters:
|
object |
&$gallery: |
The parent gallery |
|
string |
$folder8: |
folder name (UTF8) of the album |
|
bool |
$cache: |
load from cache if present |
|
|
$quiet: |
|
Redefinition of:
- MediaObject::__construct()
- Class instantiator
returns the mitigated album rights.
returns NULL if not a managed album
void checkforGuest(
[
&$hint = NULL], [
&$show = NULL], unknown_type
$hint, unknown_type
$show
)
|
|
Checks if guest is loggedin for the album
Parameters:
|
unknown_type |
$hint: |
|
|
unknown_type |
$show: |
|
|
|
&$hint: |
|
|
|
&$show: |
|
int copy(
$newfolder
$newfolder
)
|
|
Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
Parameters:
|
$newfolder |
$newfolder: |
string the folder to copy to, including the name of the current folder (possibly renamed). |
API Tags:
| Return: | 0 on success and error indicator on failure. |
Redefinition of:
- PersistentObject::copy()
- Copy this record to another unique set. Checks if the record exists there first, if so returns false. If successful returns true. No changes are made to this object and no other objects are created, just the database entry.
void garbageCollect(
[bool
$deep = false]
)
|
|
For every image in the album, look for its file. Delete from the database if the file does not exist. Same for each sub-directory/album.
Parameters:
|
bool |
$deep: |
set to true for a thorough cleansing |
Returns the id of this album in the db
Returns an URL to the album, including the current page number
array getAlbums(
[string
$page = 0], [string
$sorttype = null], [string
$sortdirection = null], [bool
$care = true], [bool
$mine = NULL]
)
|
|
Returns all folder names for all the subdirectories.
Parameters:
|
string |
$page: |
Which page of subalbums to display. |
|
string |
$sorttype: |
The sort strategy |
|
string |
$sortdirection: |
The direction of the sort |
|
bool |
$care: |
set to false if the order does not matter |
|
bool |
$mine: |
set true/false to override ownership |
string getAlbumSortKey(
[string
$sorttype = null]
)
|
|
Returns the DB key associated with the subalbum sort type
Parameters:
|
string |
$sorttype: |
subalbum sort type |
string getAlbumSortType(
)
|
|
Returns the sort type for subalbums in this album.
Will return a parent sort type if the sort type for this album is empty.
Returns the theme for the album
Gets the thumbnail URL for the album thumbnail image as returned by $this->getAlbumThumbImage();
Image getAlbumThumbImage(
)
|
|
Gets the album's set thumbnail image from the database if one exists, otherwise, finds the first image in the album or sub-album and returns it as an Image object.
Returns the folder on the filesystem
Returns the page number in the gallery of this album
int getImage(
int
$index
)
|
|
Returns an image from the album based on the index passed.
Parameters:
array getImages(
[string
$page = 0], [int
$firstPageCount = 0], [string
$sorttype = null], [string
$sortdirection = null], [bool
$care = true], [bool
$mine = NULL]
)
|
|
Returns a of a slice of the images for this album. They will also be sorted according to the sort type of this album, or by filename if none has been set.
Parameters:
|
string |
$page: |
Which page of images should be returned. If zero, all images are returned. |
|
int |
$firstPageCount: |
count of images that go on the album/image transition page |
|
string |
$sorttype: |
optional sort type |
|
string |
$sortdirection: |
optional sort direction |
|
bool |
$care: |
set to false if the order of the images does not matter |
|
bool |
$mine: |
set true/false to override ownership |
string getImageSortKey(
[string
$sorttype = null]
)
|
|
Returns the DB key associated with the image sort type
Parameters:
|
string |
$sorttype: |
the sort type |
Returns the place data of an album
Returns the album following the current album
Returns the count of subalbums
Returns the number of images in this album (not counting its subalbums)
Returns The parent Album of this Album. NULL if this is a top-level album.
Returns the album prior to the current album
object getSearchEngine(
)
|
|
Returns the search engine for a dynamic album
string getSearchParams(
)
|
|
Returns the search parameters for a dynamic album
string getSortDirection(
string
$what
)
|
|
Returns either the subalbum sort direction or the image sort direction of the album
Parameters:
|
string |
$what: |
'image_sortdirection' if you want the image direction, 'album_sortdirection' if you want it for the album |
Returns the sort type of the album images Will return a parent sort type if the sort type for this album is empty
returns the album watermark
bool getWatermarkThumb(
)
|
|
Returns the album watermark thumb
Returns true if the album is "dynamic"
void isMyItem(
bit
$action
)
|
|
checks access to the album
Parameters:
|
bit |
$action: |
What the requestor wants to do returns true of access is allowed |
Redefinition of:
- ThemeObject::isMyItem()
- Checks basic access rights of an object
returns true if there is any protection on the album
int moveAlbum(
$newfolder
$newfolder
)
|
|
Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
Parameters:
|
$newfolder |
$newfolder: |
string the folder to move to, including the name of the current folder (possibly renamed). |
API Tags:
| Return: | 0 on success and error indicator on failure. |
Simply creates objects of all the images and sub-albums in this album to load accurate values into the database.
Delete the entire album PERMANENTLY. Be careful! This is unrecoverable.
Returns true if successful
Redefinition of:
- PersistentObject::remove()
- Deletes object from the database
boolean rename(
string
$newfolder
)
|
|
Rename this album folder. Alias for moveAlbum($newfoldername);
Parameters:
|
string |
$newfolder: |
the new folder name of this album (including subalbum paths) |
API Tags:
| Return: | true on success or false on failure. |
void setAlbumTheme(
string
$theme
)
|
|
Sets the theme of the album
Parameters:
void setAlbumThumb(
string
$filename
)
|
|
Stores the thumbnail path for an album thumg
Parameters:
|
string |
$filename: |
thumbnail path |
void setLocation(
string
$place
)
|
|
Stores the album place
Parameters:
|
string |
$place: |
text for the place field |
void setSearchParams(
string
$params
)
|
|
Sets the search parameters of a dynamic album
Parameters:
|
string |
$params: |
The search string to produce the dynamic album |
void setSortDirection(
string
$what, string
$val
)
|
|
sets sort directions for the album
Parameters:
|
string |
$what: |
'image_sortdirection' if you want the image direction, 'album_sortdirection' if you want it for the album |
|
string |
$val: |
the direction |
void setSortType(
string
$sorttype
)
|
|
Stores the sort type for the album
Parameters:
|
string |
$sorttype: |
the album sort type |
void setSubalbumSortType(
string
$sorttype
)
|
|
Stores the subalbum sort type for this abum
Parameters:
|
string |
$sorttype: |
the subalbum sort type |
void setUpdatedDate(
$date
)
|
|
Parameters:
void setWatermark(
string
$wm
)
|
|
Sets the album watermark
Parameters:
void setWatermarkThumb(
$wm
$wm
)
|
|
Sets the custom watermark usage
Parameters:
array sortImageArray(
array
$images, string
$sorttype, string
$sortdirection, [bool
$mine = NULL]
)
|
|
sortImageArray will sort an array of Images based on the given key. The key must be one of (filename, title, sort_order) at the moment.
Parameters:
|
array |
$images: |
The array of filenames to be sorted. |
|
string |
$sorttype: |
optional sort type |
|
string |
$sortdirection: |
optional sort direction |
|
bool |
$mine: |
set to true/false to override ownership clause |
API Tags: