CMS Made Simple API

CmsLayoutTemplateCategory
in package

A class representing a template category.

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

Tags
license

GPL

since
2.0
author

Robert Campbell calguy1000@gmail.com

Table of Contents

Methods

delete()  : mixed
Delete this object from the database
get_all()  : array<string|int, mixed>
Load a set of categories from the database
get_description()  : string
Get the category description
get_id()  : int
Get the category id
get_item_order()  : int
Get the category order
get_modified()  : int
Get the date that this category was last saved to the database
get_name()  : string
Get the category name
load()  : self
Load a category object from the database
save()  : mixed
Save this object to the database
set_description()  : mixed
Set the category description
set_item_order()  : mixed
Set the item order.
set_name()  : mixed
Set the category name.
validate()  : mixed
Validate the correctness of this object

Methods

delete()

Delete this object from the database

public delete() : mixed

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

Tags
throws
CmsSQLErrorException

get_all()

Load a set of categories from the database

public static get_all([string $prefix = '' ]) : array<string|int, mixed>
Parameters
$prefix : string = ''

An optional category name prefix.

Return values
array<string|int, mixed>

Array of CmsLayoutTemplateCategory objects

get_modified()

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

public get_modified() : int
Return values
int

The unix timestamp from the database

set_description()

Set the category description

public set_description(string $str) : mixed
Parameters
$str : string

The description

set_item_order()

Set the item order.

public set_item_order(int $idx) : mixed

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

Parameters
$idx : int

        
On this page

Search results