Difference between revisions of "Freeside:4:Documentation:Developer/FS/class Common"
From Freeside
(Edit via perl MediaWiki framework (1.13)) |
(No difference)
|
Latest revision as of 07:18, 18 November 2015
NAME
FS::class_Common - Base class for classification classes
SYNOPSIS
use base qw( FS::class_Common ); use FS::category_table; #should use this
- required sub _target_table { 'table_name'; }
- optional for non-standard names sub _target_column { 'classnum'; } #default is classnum sub _category_table { 'table_name'; } #default is to replace s/class/category/
DESCRIPTION
FS::class_Common is a base class for classes which provide a classification for other classes, such as pkg_class or cust_class.
METHODS
- new HASHREF
- Creates a new classification. To add the classfication to the database, see "insert".
- insert
- Adds this classification to the database. If there is an error, returns the error, otherwise returns false.
- delete
- Deletes this classification from the database. Only classifications with no associated target objects 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 classification. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- category
- Returns the category record associated with this class, or false if there is none.
- categoryname
- Returns the category name associated with this class, or false if there is none.
BUGS
SEE ALSO
FS::category_Common, FS::pkg_class, FS::cust_class
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
- Around line 136:
- You forgot a '=back' before '=head1'