SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Tags

No description yet.

Functions

NameVisibilityDescription
beginsWithpublic (static)Returns all tags which begin with a given string
byRecordpublic (static)Returns all of the tags for a given record
byTablepublic (static)Returns all of the tags for a given table
findRecordspublic (static)Returns all of the records for a given table/tag
getListpublic (static)Get HTML for a tag list (i.e. for tag display on the front-end)
recordCountspublic (static)Return the tags for a table, along with the number of records for each tag
recordCountsPerSubsitepublic (static)Return the tags for a table, along with the number of records for each tag
splitupTagspublic (static)Converts a comma-separated string into a list of tags
suggestTagspublic (static)Returns common tags. Typically tags are returned from the provided table, but not necessarily.
updatepublic (static)Updates tags for a given record

public beginsWith

array Tags::beginsWith ( string $prefix );

Returns all tags which begin with a given string

public byRecord

array Tags::byRecord ( string $table , int $record_id );

Returns all of the tags for a given record

public byTable

array Tags::byTable ( string $table );

Returns all of the tags for a given table

public findRecords

array Tags::findRecords ( string $table , string $tag );

Returns all of the records for a given table/tag

public getList

string Tags::getList ( [ array $tags ] );

Get HTML for a tag list (i.e. for tag display on the front-end)

public recordCounts

array Tags::recordCounts ( string $table , int $limit );

Return the tags for a table, along with the number of records for each tag

public recordCountsPerSubsite

array Tags::recordCountsPerSubsite ( string $table , int $limit [, int $subsite_id ] );

Return the tags for a table, along with the number of records for each tag
Results are filtered by subsite, including records with subsite_id of NULL which is all sites

public splitupTags

array Tags::splitupTags ( string $string );

Converts a comma-separated string into a list of tags

public suggestTags

array Tags::suggestTags ( [ string $table [, string $prefix [, int $number ]]] );

Returns common tags. Typically tags are returned from the provided table, but not necessarily.

public update

bool Tags::update ( string $table , int $record_id , array $new_tags [, bool $remove ] );

Updates tags for a given record