Skip to content
Jeff Johns edited this page Feb 4, 2014 · 2 revisions
Controller Extends Path
Tags Plain_Controller /application/controllers/tags.php

Request Types

Type Accessible
XMLHttpRequest Yes
API Yes
Web View No

This controller handles the XMLHttpRequest and API requests for adding a getting tags.

Methods

__construct - Public

Called automatically which in turn calls the parent constructor. It also does the following:

  • Redirects the user if logged out
  • Redirects the user if the request is for a web view

index - Public

Get a list of all the tags in the system, 30 at a time.

Example

URL: /tags
URL with Page Number: /tags/5

add - Public

Adds a new tag to the system. If tag already exists it just returns the tag information.

Query Parameters

Variable Type Default Required Options Description
name String N/A Yes N/A The name of the tag.

Example

URL: /tag/add
Query Parameters: name=My%20Tag