Class Ansel_View_Base
The Ansel_View_Abstract:: Parent class for the various Ansel_View classes
Copyright 2008-2012 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.
Methods summary
public
|
#
__construct( array $params = array() )
Const'r
Any javascript files needed by the (non-api) view should be included
within this method. Additionally, any redirects need to be done in the
cont'r since when ::html() is called, headers will have already been
sent.
Parameters
- $params
- Any parameters that the view might need.
<pre>gallery_id The gallery id this view is <span class="php-keyword1">for</span>. <span class="php-keyword1">If</span> omitted, it
looks <span class="php-keyword1">for</span> a query parameter called <span class="php-quote">'gallery'</span>
gallery_slug Same <span class="php-keyword1">as</span> above, but a slug
gallery_view_url <span class="php-keyword1">If</span> set, this is used <span class="php-keyword1">as</span> the <span class="php-keyword2">link</span> to a gallery
view. %g is replaced by the gallery_id <span class="php-keyword1">and</span> %s is
replaced by the gallery_slug.
gallery_view The specific Renderer to <span class="php-keyword1">use</span>, <span class="php-keyword1">if</span> needed.
(GalleryLightbox, Gallery etc...).
image_view_url <span class="php-keyword1">If</span> this is set, the image tiles will <span class="php-keyword1">use</span> this url
<span class="php-keyword1">for</span> the image view <span class="php-keyword2">link</span>. %i <span class="php-keyword1">and</span> %g will be
replaced by image_id <span class="php-keyword1">and</span> gallery_id respectively.
%s will be replaced by the gallery_slug
image_view_src <span class="php-keyword1">If</span> this is set to <span class="php-keyword1">true</span>, the image view <span class="php-keyword2">link</span> will go
directly to the actual image. This overrides any
setting of image_view_url.
image_view_attributes An optional <span class="php-keyword1">array</span> of attribute => value pairs
that are used <span class="php-keyword1">as</span> attributes of the image view
<span class="php-keyword2">link</span>.
image_view_title Specifies which property of the image object
to <span class="php-keyword1">use</span> <span class="php-keyword1">as</span> the image caption.
image_onclick Specifies a onclick handler <span class="php-keyword1">for</span> the image tile
links.
style Force the <span class="php-keyword1">use</span> of this named style.
api <span class="php-keyword1">If</span> set, we are being called from the external api
page The gallery page number to display <span class="php-keyword1">if</span> not the
<span class="php-keyword1">default</span> value of the first page (page = <span class="php-num">0</span>)
day, month, year Numeric <span class="php-keyword2">date</span> part values to describe the gallery
<span class="php-keyword2">date</span> grouping to view in <span class="php-keyword2">date</span> mode.
force_date_grouping <span class="php-keyword1">Do</span> not auto navigate to the first <span class="php-keyword2">date</span> grouping
with more then one resource. Used from the api
when clicking on breadcrumb links, <span class="php-keyword1">for</span> example.</pre>
|
public
|
|
public
|
#
__set( mixed $property, mixed $value )
|
public
|
|
public
unknown_type
|
#
getParams( )
Getter for the view parameters.
Getter for the view parameters.
Returns
unknown_type
|
public static
string
|
#
json( Ansel_Gallery $gallery, array $params = array() )
JSON representation of this gallery's images. We don't use
Ansel_Gallery::toJson() on purpose since that is a general jsonification
of the gallery data. This method is specific to the view, paging, links
etc...
JSON representation of this gallery's images. We don't use
Ansel_Gallery::toJson() on purpose since that is a general jsonification
of the gallery data. This method is specific to the view, paging, links
etc...
Parameters
- $gallery
- The gallery to represent in this view
- $params
- An array of parameters for this method:
<pre>full - Should a full URL be generated? [<span class="php-keyword1">false</span>]
from - Starting image <span class="php-keyword2">count</span> [<span class="php-num">0</span>]
<span class="php-keyword2">count</span> - The number of images to <span class="php-keyword1">include</span> (starting at from) [<span class="php-num">0</span>]
image_view - The type of ImageGenerator to obtain the src url <span class="php-keyword1">for</span>. [screen]
view_links - Should the JSON <span class="php-keyword1">include</span> links to the Image <span class="php-keyword1">and</span>/<span class="php-keyword1">or</span> Gallery View? [<span class="php-keyword1">false</span>]
perpage - Number of images per page [from user prefs]</pre>
Returns
string A serialized JSON array.
|