Freeside:3:Documentation:Developer/FS/pkg category

From Freeside
< Freeside:3:Documentation:Developer‎ | FS
Revision as of 21:05, 27 June 2012 by Ivan (talk | contribs) (Edit via perl MediaWiki framework (1.13))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NAME

FS::pkg_category - Object methods for pkg_category records

SYNOPSIS

 use FS::pkg_category;

 $record = new FS::pkg_category \%hash;
 $record = new FS::pkg_category { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::pkg_category object represents an package category. Every package class (see FS::pkg_class) has, optionally, a package category. FS::pkg_category inherits from FS::Record. The following fields are currently supported:

categorynum
primary key (assigned automatically for new package categoryes)
categoryname
Text name of this package category
weight
Weight
disabled
Disabled flag, empty or 'Y'

METHODS

new HASHREF
Creates a new package category. To add the package category to the database, see "insert".
insert
Adds this package category to the database. If there is an error, returns the error, otherwise returns false.
delete
Deletes this package category from the database. Only package categoryes with no associated package definitions can be deleted. If there is an error, returns the error, otherwise returns false.
replace [ OLD_RECORD ]
Replaces OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
check
Checks all fields to make sure this is a valid package category. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.

BUGS

SEE ALSO

FS::category_Common, FS::Record