SORT_ASCENDING
SORT_ASCENDING
Ansel Base Class.
Copyright 2001-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.
selectGalleries(array $params = array()) : string
Return a string containing an <option> listing of the given gallery array.
array | $params | An array of options: (integer)selected The gallery_id of the gallery that is selected (integer)perm The permissions filter to use [Horde_Perms::SHOW] (mixed)attributes Restrict the galleries returned to those matching the filters. Can be an array of attribute/values pairs or a gallery owner username. (boolean)all_levels (integer)from The gallery to start listing at. (integer)count The number of galleries to return. (integer)ignore An Ansel_Gallery id to ignore when building the tree. |
The HTML to display the option list.
getUrlFor(string $controller, array $data, boolean $full = false, integer $append_session) : \Horde_Url
Return a properly formatted link depending on the global pretty url configuration
string | $controller | The controller to generate a URL for. |
array | $data | The data needed to generate the URL. |
boolean | $full | Generate a full URL. |
integer | $append_session | 0 = only if needed, 1 = always, -1 = never. |
The generated URL
getImageUrl(string $imageId, string $view = 'screen', boolean $full = false, \Ansel_Style $style = null) : \Horde_Url
Return a link to an image, suitable for use in an <img/> tag Takes into account $conf['vfs']['direct'] and other factors.
string | $imageId | The id of the image. |
string | $view | The view ('screen', 'thumb', 'full', 'mini') to show. |
boolean | $full | Return a path that includes the server name? |
\Ansel_Style | $style | Use this gallery style |
The image path.
getImageFromFile(string $file, array $override = array()) : array
Read an image from the filesystem.
string | $file | The filename of the image. |
array | $override | Overwrite the file array with these values. |
The image data of the file as an array
getBreadCrumbs(\Ansel_Gallery $gallery = null, \stirng $separator = ' » ') : string
Generate a list of breadcrumbs showing where we are in the gallery tree.
\Ansel_Gallery | $gallery | The gallery the bread crumbs are for. |
\stirng | $separator | The separator text to use between crumbs. |
getStyleSelect(string $element_name, string $selected = '') : string
Build a HTML <select> element containing all the available gallery styles.
string | $element_name | The element's id/name attribute. |
string | $selected | Mark this element as currently selected. |
The HTML for the
getStyleDefinition(string $style) : \Ansel_Style
Get a pre-defined style definition for the requested named style
string | $style | The name of the style to fetch |
The definition of the requested style if it's available, otherwise, the ansel_default style is returned.
getDateParameter(array $date = array()) : array
Get a date parts array containing only enough date parts for the depth we are at. If an empty array is passed, attempt to get the parts from url parametrs. Any missing date parts must be set to 0.
array | $date | A full date parts array or an empty array. |
A trimmed down (if necessary) date parts array.
downloadImagesAsZip(\Ansel_Gallery $gallery = null, array $images = array())
Downloads all requested images as a zip file. Assumes all permissions have been checked on the requested resource. Can request either a single gallery of images, OR an array of individual image ids.
\Ansel_Gallery | $gallery | The galleries to download |
array | $images | The images to download |
getTagLinks(array $tags, string $action = 'add', string $owner = null) : string
Get the URL for a tag search link
array | $tags | The tag ids to link to |
string | $action | The action we want to perform with this tag. |
string | $owner | The owner we want to filter the results by |
The URL for this tag and action
sendEcard(\Ansel_Image $image)
Handle sending an Ecard.
\Ansel_Image | $image | The image to attach the card to. |