Method | Description | |
---|---|---|
doSendfile ( string $filename, string $type ) | Send appropriate headers for sendfile support based on server. | |
downloadImagesAsZip ( Ansel_Gallery $gallery = null, array $images = [] ) | 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. | |
embedCode ( array $options ) : string | Generate the JS necessary to embed a gallery / images into another external site. | |
getBreadCrumbs ( Ansel_Gallery $gallery = null, stirng $separator = ' » ' ) : string | Generate a list of breadcrumbs showing where we are in the gallery tree. | |
getDateParameter ( array $date = [] ) : 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. | |
getErrorImage ( string $view = 'screen' ) : string | This photo should be used as a placeholder if the correct photo can't be retrieved | |
getImageFromFile ( string $file, array $override = [] ) : array | Read an image from the filesystem. | |
getImageObject ( array $params = [] ) : Horde_Image | Obtain a Horde_Image object | |
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 tag Takes into account $conf['vfs']['direct'] and other factors. | |
getStyleDefinition ( string $style ) : Ansel_Style | Get a pre-defined style definition for the requested named style | |
getStyleSelect ( string $element_name, string $selected = '' ) : string | Build a HTML | |
getTagLinks ( array $tags, string $action = 'add', string $owner = null ) : string | Get the URL for a tag search link | |
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 | |
initJSVariables ( ) | Simple helper to output initial Ansel JS. | |
isAvailable ( string $feature ) : boolean | Check to see if a particular image manipulation function is available. | |
point2Deg ( float $value, boolean $lat = false ) : string | Helper function for displaying Lat/Lng values | |
selectGalleries ( array $params = [] ) : string | Return a string containing an |
public static doSendfile ( string $filename, string $type ) | ||
$filename | string | The full file path of the file to send. |
$type | string | The MIME type of the file. |
public static downloadImagesAsZip ( Ansel_Gallery $gallery = null, array $images = [] ) | ||
$gallery | Ansel_Gallery | The galleries to download |
$images | array | The images to download |
public static getBreadCrumbs ( Ansel_Gallery $gallery = null, stirng $separator = ' » ' ) : string | ||
$gallery | Ansel_Gallery | The gallery the bread crumbs are for. |
$separator | stirng | The separator text to use between crumbs. |
return | string |
public static getDateParameter ( array $date = [] ) : array | ||
$date | array | A full date parts array or an empty array. |
return | array | A trimmed down (if necessary) date parts array. |
public static getErrorImage ( string $view = 'screen' ) : string | ||
$view | string | The view ('screen', 'thumb', or 'full') to show. Defaults to 'screen'. |
return | string | The image path. |
public static getImageObject ( array $params = [] ) : Horde_Image | ||
$params | array | Any additional parameters |
return | Horde_Image | object |
public static getImageUrl ( string $imageId, string $view = 'screen', boolean $full = false, Ansel_Style $style = null ) : Horde_Url | ||
$imageId | string | The id of the image. |
$view | string | The view ('screen', 'thumb', 'full', 'mini') to show. |
$full | boolean | Return a path that includes the server name? |
$style | Ansel_Style | Use this gallery style |
return | Horde_Url | The image path. |
public static getStyleDefinition ( string $style ) : Ansel_Style | ||
$style | string | The name of the style to fetch |
return | Ansel_Style | The definition of the requested style if it's available, otherwise, the ansel_default style is returned. |
public static getUrlFor ( string $controller, array $data, boolean $full = false, integer $append_session ) : Horde_Url | ||
$controller | string | The controller to generate a URL for. |
$data | array | The data needed to generate the URL. |
$full | boolean | Generate a full URL. |
$append_session | integer | 0 = only if needed, 1 = always, -1 = never. |
return | Horde_Url | The generated URL |
public static initJSVariables ( ) |
public static isAvailable ( string $feature ) : boolean | ||
$feature | string | The name of the function. |
return | boolean | True if the function is available. |
public static selectGalleries ( array $params = [] ) : string | ||
$params | array | 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. |
return | string | The HTML to display the option list. |