From 1add5445e76748a0832f667809cd9c9aac401dcc Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 15 Feb 2010 12:43:28 -0500 Subject: [PATCH] ws, comments --- ansel/lib/View/Base.php | 56 ++++++++++++++++++++++++++++++++++++++++++++-- ansel/lib/View/Gallery.php | 48 +-------------------------------------- 2 files changed, 55 insertions(+), 49 deletions(-) diff --git a/ansel/lib/View/Base.php b/ansel/lib/View/Base.php index a9f695f41..b71df0713 100644 --- a/ansel/lib/View/Base.php +++ b/ansel/lib/View/Base.php @@ -31,7 +31,60 @@ abstract class Ansel_View_Base */ protected $_widgets = array(); - + /** + * Const'r + * + * Any javascript files needed by the (non-api) view should be included + * within this method. + * + * @param array $params Any parameters that the view might need. + *
+     * gallery_id              The gallery id this view is for. If omitted, it
+     *                         looks for a query parameter called 'gallery'
+     *
+     * gallery_slug            Same as above, but a slug
+     *
+     * gallery_view_url        If set, this is used as the link to a gallery
+     *                         view. %g is replaced by the gallery_id and %s is
+     *                         replaced by the gallery_slug.
+     *
+     * gallery_view            The specific Renderer to use, if needed.
+     *                         (GalleryLightbox, Gallery etc...).
+     *
+     * image_view_url          If this is set, the image tiles will use this url
+     *                         for the image view link. %i and %g will be
+     *                         replaced by image_id and gallery_id respectively.
+     *                         %s will be replaced by the gallery_slug
+     *
+     * image_view_src          If this is set to true, the image view link will go
+     *                         directly to the actual image. This overrides any
+     *                         setting of image_view_url.
+     *
+     * image_view_attributes   An optional array of attribute => value pairs
+     *                         that are used as attributes of the image view
+     *                         link.
+     *
+     * image_view_title        Specifies which property of the image object
+     *                         to use as the image caption.
+     *
+     * image_onclick           Specifies a onclick handler for the image tile
+     *                         links.
+     *
+     * style                   Force the use of this named style.
+     *
+     * api                     If set, we are being called from the external api
+     *
+     * page                    The gallery page number to display if not the
+     *                         default value of the first page (page = 0)
+     *
+     * day, month, year        Numeric date part values to describe the gallery
+     *                         date grouping to view in date mode.
+     *
+     * force_date_grouping     Do not auto navigate to the first date grouping
+     *                         with more then one resource. Used from the api
+     *                         when clicking on breadcrumb links, for example.
+     * 
+ */ public function __construct($params = array()) { $this->_params = $params; @@ -119,7 +172,6 @@ abstract class Ansel_View_Base } } - /** * Output any widgets associated with this view. * diff --git a/ansel/lib/View/Gallery.php b/ansel/lib/View/Gallery.php index c1d2e984b..356e2fff7 100644 --- a/ansel/lib/View/Gallery.php +++ b/ansel/lib/View/Gallery.php @@ -22,53 +22,7 @@ class Ansel_View_Gallery extends Ansel_View_Base /** * Const'r * - * @param array $params Any parameters that the view might need. - *
-     * gallery_id              The gallery id this view is for. If omitted, it
-     *                         looks for a query parameter called 'gallery'
-     *
-     * gallery_slug            Same as above, but a slug
-     *
-     * gallery_view_url        If set, this is used as the link to a gallery
-     *                         view. %g is replaced by the gallery_id and %s is
-     *                         replaced by the gallery_slug.
-     *
-     * gallery_view            The specific Renderer to use, if needed.
-     *                         (GalleryLightbox, Gallery etc...).
-     *
-     * image_view_url          If this is set, the image tiles will use this url
-     *                         for the image view link. %i and %g will be
-     *                         replaced by image_id and gallery_id respectively.
-     *                         %s will be replaced by the gallery_slug
-     *
-     * image_view_src          If this is set to true, the image view link will go
-     *                         directly to the actual image. This overrides any
-     *                         setting of image_view_url.
-     *
-     * image_view_attributes   An optional array of attribute => value pairs
-     *                         that are used as attributes of the image view
-     *                         link.
-     *
-     * image_view_title        Specifies which property of the image object
-     *                         to use as the image caption.
-     *
-     * image_onclick           Specifies a onclick handler for the image tile
-     *                         links.
-     *
-     * style                   Force the use of this named style.
-     *
-     * api                     If set, we are being called from the external api
-     *
-     * page                    The gallery page number to display if not the
-     *                         default value of the first page (page = 0)
-     *
-     * day, month, year        Numeric date part values to describe the gallery
-     *                         date grouping to view in date mode.
-     *
-     * force_date_grouping     Do not auto navigate to the first date grouping
-     *                         with more then one resource. Used from the api
-     *                         when clicking on breadcrumb links, for example.
-     * 
+ * @see Ansel_View_Base::__construct */ public function __construct($params = array()) { -- 2.11.0