Static Public Member Functions | Static Protected Attributes

Tags Class Reference

Inheritance diagram for Tags:
Collaboration diagram for Tags:

List of all members.

Static Public Member Functions

static get_one ($tag)
static get_by_text ($tag)
static get_by_slug ($tag)
static get_by_id ($tag)
static vocabulary ()
static get_by_frequency ($limit=null, $post_type=null)
static object_type ()
static save_associations ($terms, $object_id, $object_type= 'post')
static parse_url_tags ($tags, $objectify=false)

Static Protected Attributes

static $vocabulary = 'tags'
static $object_type = 'post'

Detailed Description

Habari Tags Class

Definition at line 11 of file tags.php.


Member Function Documentation

static Tags::get_by_frequency ( limit = null,
post_type = null 
) [static]

Returns a list of terms from this vocabulary ordered by frequency of use on the post type specified

Parameters:
int $limit If supplied, limits the results to the specified number
mixed $post_type If a name or id of a post type is supplied, limits the results to the terms applying to that type
Returns:
Tags A Tags instance containing the terms, each having an additional property of "count" that tells how many times the term was used

Definition at line 78 of file tags.php.

static Tags::get_by_id ( tag  )  [static]

Returns a Tag object based on a supplied ID

Parameters:
Integer tag_id The ID of the tag to retrieve
Returns:
A Tag object

Reimplemented from Vocabulary.

Definition at line 56 of file tags.php.

Referenced by AdminTagsHandler::ajax_tags().

static Tags::get_by_slug ( tag  )  [static]

Return a tag based on a tag's text

Returns:
A Tag object

Definition at line 45 of file tags.php.

static Tags::get_by_text ( tag  )  [static]

Return a tag based on a tag's text

Returns:
A Tag object

Definition at line 35 of file tags.php.

static Tags::get_one ( tag  )  [static]

Return a tag based on an id, tag text or slug

Returns:
Tag The tag object

Definition at line 21 of file tags.php.

Referenced by get_by_id(), get_by_slug(), get_by_text(), and parse_url_tags().

static Tags::object_type (  )  [static]

Returns the default type Tags uses

Returns:
String The default type name

Definition at line 117 of file tags.php.

static Tags::parse_url_tags ( tags,
objectify = false 
) [static]

Parse tag parameters from a URL string

Parameters:
String $tags The URL parameter string
Returns:
Array. Associative array of included and excluded tags

Definition at line 146 of file tags.php.

Referenced by Theme::act_display(), and Theme::act_display_tag().

static Tags::save_associations ( terms,
object_id,
object_type = 'post' 
) [static]

Save the tags associated to this object into the terms and object_terms tables

Parameters:
Array $tags strings. The tag names to associate to the object
Integer $object_id. The id of the object being tagged
String $object_type. The name of the type of the object being tagged. Defaults to post
Returns:
boolean. Whether the associating succeeded or not. true

Definition at line 131 of file tags.php.

Referenced by Post::delete().

static Tags::vocabulary (  )  [static]

The documentation for this class was generated from the following file: