CmsLayoutTemplateCategory View code

A class representing a template category.

Templates can be optionally organized into categories, this class manages the category itself.

package

CMS

license

GPL

since 2.0
author

Robert Campbell calguy1000@gmail.com

Methods

get_id() : integer

Get the category id

Response

integer

get_name() : string

Get the category name

Response

string

set_name(\sting $str) 

Set the category name.

The category name must be unique, and can only contain certain characters.

Arguments

\sting $str

The template type name.

get_description() : string

Get the category description

Response

string

set_description(string $str) 

Set the category description

Arguments

string $str

The description

get_item_order() : integer

Get the category order

Response

integer

set_item_order(integer $idx) 

Set the item order.

The item order must be unique and incremental no validation is done on the item order in this method.

Arguments

integer $idx

get_modified() : integer

Get the date that this category was last saved to the database

Response

integer

The unix timestamp from the database

validate() 

Validate the correctness of this object

save() 

Save this object to the database

delete() 

Delete this object from the database

This method will delete the object from the database, and erase the item order and id values from this object, suitable for re-saving

load(integer|string $val) : self

Load a category object from the database

static

Arguments

integer|string $val

Either the integer category id, or the category name

Response

self

get_all(string $prefix = '') : array

Load a set of categories from the database

static

Arguments

string $prefix

An optional category name prefix.

Response

array

Array of CmsLayoutTemplateCategory objects