Elgg  Version 1.9
Namespaces | Functions
tags.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Activate a plugin or plugins.
 

Functions

 string_to_tag_array ($string)
 Takes in a comma-separated string and returns an array of tags which have been trimmed. More...
 
 elgg_get_tags (array $options=array())
 Get popular tags and their frequencies. More...
 
 elgg_register_tag_metadata_name ($name)
 Registers a metadata name as containing tags for an entity. More...
 
 elgg_get_registered_tag_metadata_names ()
 Returns an array of valid metadata names for tags. More...
 
 _elgg_tagcloud_page_handler ($page)
 Page hander for sitewide tag cloud. More...
 
 _elgg_tags_init ()
 private More...
 

Function Documentation

_elgg_tagcloud_page_handler (   $page)

Page hander for sitewide tag cloud.

Parameters
array$pagePage array
Returns
bool private

Definition at line 245 of file tags.php.

_elgg_tags_init ( )

private

Definition at line 267 of file tags.php.

elgg_get_registered_tag_metadata_names ( )

Returns an array of valid metadata names for tags.

Returns
array
Since
1.7.0

Definition at line 229 of file tags.php.

elgg_get_tags ( array  $options = array())

Get popular tags and their frequencies.

Supports similar arguments as elgg_get_entities()

Parameters
array$optionsArray in format:
threshold => INT minimum tag count

tag_names => array() metadata tag names - must be registered tags

limit => INT number of tags to return

types => null|STR entity type (SQL: type = '$type')

subtypes => null|STR entity subtype (SQL: subtype = '$subtype')

type_subtype_pairs => null|ARR (array('type' => 'subtype')) (SQL: type = '$type' AND subtype = '$subtype') pairs

owner_guids => null|INT entity guid

container_guids => null|INT container_guid

site_guids => null (current_site)|INT site_guid

created_time_lower => null|INT Created time lower boundary in epoch time

created_time_upper => null|INT Created time upper boundary in epoch time

modified_time_lower => null|INT Modified time lower boundary in epoch time

modified_time_upper => null|INT Modified time upper boundary in epoch time

wheres => array() Additional where clauses to AND together

joins => array() Additional joins

Returns
object[]|false If no tags or error, false otherwise, array of objects with ->tag and ->total values
Since
1.7.1
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 71 of file tags.php.

elgg_register_tag_metadata_name (   $name)

Registers a metadata name as containing tags for an entity.

This is required if you are using a non-standard metadata name for your tags.

Parameters
string$nameTag name
Returns
bool
Since
1.7.0

Definition at line 209 of file tags.php.

string_to_tag_array (   $string)

Takes in a comma-separated string and returns an array of tags which have been trimmed.

Parameters
string$stringComma-separated tag string
Returns
array|false An array of strings, or false on failure

Definition at line 18 of file tags.php.