Overview

Packages

  • Ansel
  • None

Classes

  • Ansel
  • Ansel_Ajax_Application
  • Ansel_Ajax_Imple_EditCaption
  • Ansel_Ajax_Imple_EditFaces
  • Ansel_Ajax_Imple_EditGalleryFaces
  • Ansel_Ajax_Imple_Embed
  • Ansel_Ajax_Imple_GallerySlugCheck
  • Ansel_Ajax_Imple_ImageSaveGeotag
  • Ansel_Ajax_Imple_LocationAutoCompleter
  • Ansel_Ajax_Imple_MapLayerSelect
  • Ansel_Ajax_Imple_TagActions
  • Ansel_Ajax_Imple_ToggleGalleryActions
  • Ansel_Ajax_Imple_ToggleOtherGalleries
  • Ansel_Ajax_Imple_UploadNotification
  • Ansel_Api
  • Ansel_Exception
  • Ansel_Faces
  • Ansel_Faces_Base
  • Ansel_Faces_Facedetect
  • Ansel_Faces_User
  • Ansel_Factory_Faces
  • Ansel_Factory_Storage
  • Ansel_Factory_Styles
  • Ansel_Form_Ecard
  • Ansel_Form_Image
  • Ansel_Form_ImageDate
  • Ansel_Form_Upload
  • Ansel_Gallery
  • Ansel_Gallery_Decorator_Date
  • Ansel_GalleryMode_Base
  • Ansel_GalleryMode_Date
  • Ansel_GalleryMode_Normal
  • Ansel_Image
  • Ansel_ImageGenerator
  • Ansel_ImageGenerator_Mini
  • Ansel_ImageGenerator_PolaroidThumb
  • Ansel_ImageGenerator_PolaroidThumbStack
  • Ansel_ImageGenerator_RoundedThumb
  • Ansel_ImageGenerator_RoundedThumbStack
  • Ansel_ImageGenerator_Screen
  • Ansel_ImageGenerator_ShadowThumb
  • Ansel_ImageGenerator_ShadowThumbStack
  • Ansel_ImageGenerator_SquareThumb
  • Ansel_ImageGenerator_Thumb
  • Ansel_LoginTasks_SystemTask_Upgrade
  • Ansel_Report
  • Ansel_Report_letter
  • Ansel_Report_mail
  • Ansel_Report_tickets
  • Ansel_Search
  • Ansel_Search_exif
  • Ansel_Search_Tag
  • Ansel_Storage
  • Ansel_Style
  • Ansel_Tagger
  • Ansel_Test
  • Ansel_Tile_DateGallery
  • Ansel_Tile_Gallery
  • Ansel_Tile_Image
  • Ansel_View_Ansel
  • Ansel_View_Base
  • Ansel_View_EmbeddedRenderer_GalleryLink
  • Ansel_View_EmbeddedRenderer_Mini
  • Ansel_View_EmbeddedRenderer_Slideshow
  • Ansel_View_Gallery
  • Ansel_View_GalleryProperties
  • Ansel_View_GalleryRenderer_Base
  • Ansel_View_GalleryRenderer_Gallery
  • Ansel_View_GalleryRenderer_GalleryLightbox
  • Ansel_View_Image
  • Ansel_View_List
  • Ansel_View_Results
  • Ansel_View_Slideshow
  • Ansel_View_Upload
  • Ansel_Widget
  • Ansel_Widget_Actions
  • Ansel_Widget_Base
  • Ansel_Widget_GalleryFaces
  • Ansel_Widget_Geotag
  • Ansel_Widget_ImageFaces
  • Ansel_Widget_Links
  • Ansel_Widget_OtherGalleries
  • Ansel_Widget_OwnerFaces
  • Ansel_Widget_SimilarPhotos
  • Ansel_Widget_Tags
  • Ansel_XPPublisher
  • Overview
  • Package
  • Class
  • Tree

Class Ansel_Search_Tag

Ansel_Search_Tags:: class provides logic for dealing with tag searching.

Copyright 2007-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.

Package: Ansel
Category: Horde
License: GPL
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Search/Tag.php
Methods summary
public Ansel_Search_Tag
# __construct( Ansel_Tagger $tagger, string $tags = null, mixed $owner = null )

Constructor

Constructor

Parameters

$tagger
<p>$tags An array of tag names to match. If null is passed then the tags will be loaded from the session.</p>
$tags
<p>$owner Restrict search to resources owned by specified owner.</p>
$owner

Returns

Ansel_Search_Tag
public
# save( )

Save the current search to the session

Save the current search to the session

public Array
# getSlice( mixed $page, mixed $perpage )

Fetch the matching resources that should appear on the current page

Fetch the matching resources that should appear on the current page

Returns

Array
of Ansel_Images and Ansel_Galleries
public
# addTag( string $tag )

Add a tag to the cumulative tag search

Add a tag to the cumulative tag search

Parameters

$tag
The tag name to add.
public
# removeTag( string $tag )

Remove a tag from the cumulative search

Remove a tag from the cumulative search

Parameters

$tag
The tag name to remove.
public array
# getTags( )

Get the list of currently choosen tags

Get the list of currently choosen tags

Returns

array
An array of selected tag_name => tag_id hashes.
public string
# getTagTrail( )

Get breadcrumb style navigation html for choosen tags

Get breadcrumb style navigation html for choosen tags

Returns

string
The html representing the tag trail for browsing tags.

Todo:

Remove the html generation to the view class
public integer
# tagCount( )

Get the total number of tags included in this search.

Get the total number of tags included in this search.

Returns

integer
The number of tags used in the current search.
public array
# count( )

Get the total number of resources that match.

Get the total number of resources that match.

Returns

array
Hash containing totals for both 'galleries' and 'images'.
public array
# getRelatedTags( )

Get a list of tags related to this search

Get a list of tags related to this search

Returns

array
An array tag_id => {tag_name, total}
public
# runSearch( )

Perform, and cache the search.

Perform, and cache the search.

public static
# clearSearch( )

Clears the session cache of tags currently included in the search.

Clears the session cache of tags currently included in the search.

API documentation generated by ApiGen